droid-sink droid-source: Return from process_msg only on error.

When updating the implementation to support PulseAudio 12.2 the handling
of sink/source process msg function with older PulseAudio versions
incorrectly returns always, when that should only be done in case of
error.

[modules-droid] Update sink/source state correctly with PulseAudio 11.1. JB#44329
This commit is contained in:
Juho Hämäläinen 2019-04-04 11:08:12 +03:00
parent b1ce02b3d6
commit f652f1f52a
2 changed files with 6 additions and 2 deletions

View file

@ -525,7 +525,9 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
#if PULSEAUDIO_VERSION < 12
case PA_SINK_MESSAGE_SET_STATE: {
return sink_set_state_in_io_thread_cb(u->sink, PA_PTR_TO_UINT(data), 0);
int r;
if ((r = sink_set_state_in_io_thread_cb(u->sink, PA_PTR_TO_UINT(data), 0)) < 0)
return r;
}
#endif
}

View file

@ -337,7 +337,9 @@ static int source_process_msg(pa_msgobject *o, int code, void *data, int64_t off
#if PULSEAUDIO_VERSION < 12
case PA_SOURCE_MESSAGE_SET_STATE: {
return source_set_state_in_io_thread_cb(u->source, PA_PTR_TO_UINT(data), 0);
int r;
if ((r = source_set_state_in_io_thread_cb(u->source, PA_PTR_TO_UINT(data), 0)) < 0)
return r;
}
#endif
}