diff options
Diffstat (limited to 'src/pulsecore/sink.c')
-rw-r--r-- | src/pulsecore/sink.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c index f19e8b09e..6549515b5 100644 --- a/src/pulsecore/sink.c +++ b/src/pulsecore/sink.c @@ -150,7 +150,7 @@ void pa_sink_new_data_done(pa_sink_new_data *data) { static void reset_callbacks(pa_sink *s) { pa_assert(s); - s->set_state = NULL; + s->set_state_in_main_thread = NULL; s->get_volume = NULL; s->set_volume = NULL; s->write_volume = NULL; @@ -427,9 +427,9 @@ static int sink_set_state(pa_sink *s, pa_sink_state_t state, pa_suspend_cause_t * cause, or it might just add unnecessary complexity, given that the * current approach of not setting any suspend cause works well enough. */ - if (s->set_state) { - ret = s->set_state(s, state, suspend_cause); - /* set_state() is allowed to fail only when resuming. */ + if (s->set_state_in_main_thread) { + ret = s->set_state_in_main_thread(s, state, suspend_cause); + /* set_state_in_main_thread() is allowed to fail only when resuming. */ pa_assert(ret >= 0 || resuming); } @@ -438,8 +438,8 @@ static int sink_set_state(pa_sink *s, pa_sink_state_t state, pa_suspend_cause_t /* SET_STATE is allowed to fail only when resuming. */ pa_assert(resuming); - if (s->set_state) - s->set_state(s, PA_SINK_SUSPENDED, 0); + if (s->set_state_in_main_thread) + s->set_state_in_main_thread(s, PA_SINK_SUSPENDED, 0); } if (suspend_cause_changed) { |