mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
audioadapter: clear started flag earlier
First clear the started flag so that we ignore scheduling from the follower. Then stop the follower and the converter. This is the sequence we follow when deactivating a node, so do the same here. it is important that the node is not scheduled anymore when we clear the format in suspend or else we might crash. See #2877
This commit is contained in:
parent
3e000c11c4
commit
cf3d4c3b5d
1 changed files with 5 additions and 3 deletions
|
|
@ -852,9 +852,11 @@ static int impl_node_send_command(void *object, const struct spa_command *comman
|
|||
this->started = true;
|
||||
break;
|
||||
case SPA_NODE_COMMAND_Suspend:
|
||||
this->started = false;
|
||||
spa_log_debug(this->log, "%p: suspending", this);
|
||||
break;
|
||||
case SPA_NODE_COMMAND_Pause:
|
||||
this->started = false;
|
||||
spa_log_debug(this->log, "%p: pausing", this);
|
||||
break;
|
||||
case SPA_NODE_COMMAND_Flush:
|
||||
|
|
@ -886,10 +888,10 @@ static int impl_node_send_command(void *object, const struct spa_command *comman
|
|||
break;
|
||||
case SPA_NODE_COMMAND_Suspend:
|
||||
configure_format(this, 0, NULL);
|
||||
SPA_FALLTHROUGH
|
||||
spa_log_debug(this->log, "%p: suspended", this);
|
||||
break;
|
||||
case SPA_NODE_COMMAND_Pause:
|
||||
this->started = false;
|
||||
spa_log_debug(this->log, "%p: stopped", this);
|
||||
spa_log_debug(this->log, "%p: paused", this);
|
||||
break;
|
||||
case SPA_NODE_COMMAND_Flush:
|
||||
spa_log_debug(this->log, "%p: flushed", this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue