mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-11 13:30:07 -05:00
impl-node: first start the node, then make it schedulable
We first need to issue the start command for driver nodes and then we can add the node to be scheduled. Else we might end up with nodes that receive the _process callback without the Start command being called first and we can crash. See #904
This commit is contained in:
parent
7ee52b396d
commit
4668b72312
1 changed files with 2 additions and 1 deletions
|
|
@ -338,10 +338,11 @@ static void node_update_state(struct pw_impl_node *node, enum pw_node_state stat
|
||||||
|
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case PW_NODE_STATE_RUNNING:
|
case PW_NODE_STATE_RUNNING:
|
||||||
pw_loop_invoke(node->data_loop, do_node_add, 1, NULL, 0, true, node);
|
|
||||||
if (node->driving && node->driver)
|
if (node->driving && node->driver)
|
||||||
spa_node_send_command(node->node,
|
spa_node_send_command(node->node,
|
||||||
&SPA_NODE_COMMAND_INIT(SPA_NODE_COMMAND_Start));
|
&SPA_NODE_COMMAND_INIT(SPA_NODE_COMMAND_Start));
|
||||||
|
|
||||||
|
pw_loop_invoke(node->data_loop, do_node_add, 1, NULL, 0, true, node);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue