mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
alsa: Don't always suspend/unsuspend on sink-input removal
If the sink was already suspended, this avoids and assert when calling suspend() again, and prevents an unnecessary unsuspend.
This commit is contained in:
parent
2677911e92
commit
dde09c7fac
1 changed files with 2 additions and 2 deletions
|
|
@ -1106,12 +1106,12 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* .. we do */
|
/* .. we do */
|
||||||
if ((r = suspend(u)) < 0)
|
if (PA_SINK_IS_OPENED(u->sink->thread_info.state) && ((r = suspend(u)) < 0))
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
u->sink->sample_spec.rate = u->old_rate;
|
u->sink->sample_spec.rate = u->old_rate;
|
||||||
|
|
||||||
if ((r = unsuspend(u)) < 0)
|
if (PA_SINK_IS_OPENED(u->sink->thread_info.state) && ((r = unsuspend(u)) < 0))
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue