mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-17 07:00:03 -05:00
node: only add node when active
When moving a node from one graph to another, only add the node if it was actually added to the source graph. Because nodes are added when activated, it might be possible the node was not added yet.
This commit is contained in:
parent
c42b108ac8
commit
3476617cff
1 changed files with 3 additions and 2 deletions
|
|
@ -524,9 +524,10 @@ do_move_nodes(struct spa_loop *loop,
|
||||||
pw_log_trace("node %p: root %p driver:%p->%p", this,
|
pw_log_trace("node %p: root %p driver:%p->%p", this,
|
||||||
&this->rt.root, &src->driver_graph, &dst->driver_graph);
|
&this->rt.root, &src->driver_graph, &dst->driver_graph);
|
||||||
|
|
||||||
if (this->rt.root.graph != NULL)
|
if (this->rt.root.graph != NULL) {
|
||||||
spa_graph_node_remove(&this->rt.root);
|
spa_graph_node_remove(&this->rt.root);
|
||||||
spa_graph_node_add(&dst->driver_graph, &this->rt.root);
|
spa_graph_node_add(&dst->driver_graph, &this->rt.root);
|
||||||
|
}
|
||||||
|
|
||||||
if (this->node && spa_node_set_io(this->node,
|
if (this->node && spa_node_set_io(this->node,
|
||||||
SPA_IO_Position,
|
SPA_IO_Position,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue