mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-24 08:56:47 -05:00
impl-link: reset state to INIT if not destroyed
If the link isn't destroyed, don't allow changing state to PAUSED for states < PAUSED. For example, if the deactivation is called during the link being in NEGOTIATING it could then jump directly to PAUSED and believe it is prepared. Fixes #3619
This commit is contained in:
parent
38157a8937
commit
baac9aa549
1 changed files with 5 additions and 3 deletions
|
|
@ -884,9 +884,11 @@ int pw_impl_link_deactivate(struct pw_impl_link *this)
|
|||
|
||||
impl->activated = false;
|
||||
pw_log_info("(%s) deactivated", this->name);
|
||||
link_update_state(this, this->destroyed ?
|
||||
PW_LINK_STATE_INIT : PW_LINK_STATE_PAUSED,
|
||||
0, NULL);
|
||||
|
||||
if (this->info.state < PW_LINK_STATE_PAUSED || this->destroyed)
|
||||
link_update_state(this, PW_LINK_STATE_INIT, 0, NULL);
|
||||
else
|
||||
link_update_state(this, PW_LINK_STATE_PAUSED, 0, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue