mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
impl-node: only pause pause_on_idle nodes
When we are starting a node and need to cancel it, only set the node to the paused state when pause_on_idle is set. Use the pause_node function to make sure everything is in the paused state. Otherwise we would send a Pause command to the node but because it was still added to the graph we would continue to call the process function on it. Fixes #2701
This commit is contained in:
parent
7c93c29cfd
commit
69e6db5216
1 changed files with 2 additions and 2 deletions
|
|
@ -2222,8 +2222,8 @@ int pw_impl_node_set_state(struct pw_impl_node *node, enum pw_node_state state)
|
|||
state < PW_NODE_STATE_RUNNING &&
|
||||
impl->pending_play) {
|
||||
impl->pending_play = false;
|
||||
spa_node_send_command(node->node,
|
||||
&SPA_NODE_COMMAND_INIT(SPA_NODE_COMMAND_Pause));
|
||||
if (impl->pause_on_idle)
|
||||
pause_node(node);
|
||||
}
|
||||
pw_work_queue_cancel(impl->work, node, impl->pending_id);
|
||||
node->info.state = impl->pending_state;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue