From: Tanu Kaskinen Date: Thu, 22 Feb 2018 08:06:59 +0000 (+0200) Subject: sink: don't sync monitor suspend state when unlinking X-Git-Tag: v11.99.1~41 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d6e39b5e891c767dd42c369d9f118560b8bb24ae;p=platform%2Fupstream%2Fpulseaudio.git sink: don't sync monitor suspend state when unlinking When the sink is unlinked, there's no need to update the monitor suspend state. In fact, trying to do that causes an assertion failure, because pa_source_sync_suspend() wasn't written to handle the case where the sink is unlinked. --- diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c index 0dfc91c..f19e8b0 100644 --- a/src/pulsecore/sink.c +++ b/src/pulsecore/sink.c @@ -481,7 +481,7 @@ static int sink_set_state(pa_sink *s, pa_sink_state_t state, pa_suspend_cause_t } finish: - if ((suspending || resuming || suspend_cause_changed) && s->monitor_source) + if ((suspending || resuming || suspend_cause_changed) && s->monitor_source && state != PA_SINK_UNLINKED) pa_source_sync_suspend(s->monitor_source); return ret;