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.
Change-Id: I6352eee5ec9b5b59234b738997f9c055a33b8a76
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
}
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;