mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -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;
|
||||
|
||||
/* .. we do */
|
||||
if ((r = suspend(u)) < 0)
|
||||
if (PA_SINK_IS_OPENED(u->sink->thread_info.state) && ((r = suspend(u)) < 0))
|
||||
return r;
|
||||
|
||||
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;
|
||||
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue