summaryrefslogtreecommitdiff
path: root/src/pulsecore/sink.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulsecore/sink.c')
-rw-r--r--src/pulsecore/sink.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index 6549515b5..2c9334931 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -151,6 +151,7 @@ static void reset_callbacks(pa_sink *s) {
pa_assert(s);
s->set_state_in_main_thread = NULL;
+ s->set_state_in_io_thread = NULL;
s->get_volume = NULL;
s->set_volume = NULL;
s->write_volume = NULL;
@@ -2850,6 +2851,13 @@ int pa_sink_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offse
(s->thread_info.state == PA_SINK_SUSPENDED && PA_SINK_IS_OPENED(PA_PTR_TO_UINT(userdata))) ||
(PA_SINK_IS_OPENED(s->thread_info.state) && PA_PTR_TO_UINT(userdata) == PA_SINK_SUSPENDED);
+ if (s->set_state_in_io_thread) {
+ int r;
+
+ if ((r = s->set_state_in_io_thread(s, PA_PTR_TO_UINT(userdata))) < 0)
+ return r;
+ }
+
s->thread_info.state = PA_PTR_TO_UINT(userdata);
if (s->thread_info.state == PA_SINK_SUSPENDED) {