[PATCH] sink: don't sync monitor suspend state when unlinking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 22.02.2018 09:06, Tanu Kaskinen wrote:
> 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.
> ---
>   src/pulsecore/sink.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
> index 0dfc91c87..f19e8b09e 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;

LGTM



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux