mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-06-20 14:33:04 -04:00
impl-node: trigger a graph recalc on active node with driver
When adding the freeze/thaw recalc graph calls, triggering the actual recalc of the graph (when an active node with a driver was removed) was removed. The thaw only actually recalcs the graph when something set the recalc_pending flag so we still need something to set this. Normally this would be because of some of the ports or links that got destroyed but if not, the original recalc trigger needs to remain as a fallback.
This commit is contained in:
parent
6dafdd1b7a
commit
b21cad1eab
1 changed files with 7 additions and 0 deletions
|
|
@ -2418,7 +2418,9 @@ void pw_impl_node_destroy(struct pw_impl_node *node)
|
|||
struct pw_impl_port *port;
|
||||
struct pw_impl_node *follower;
|
||||
struct pw_context *context = node->context;
|
||||
bool active, had_driver;
|
||||
|
||||
active = node->active;
|
||||
node->active = false;
|
||||
node->runnable = false;
|
||||
|
||||
|
|
@ -2434,6 +2436,7 @@ void pw_impl_node_destroy(struct pw_impl_node *node)
|
|||
pw_impl_node_emit_destroy(node);
|
||||
|
||||
pw_log_debug("%p: driver node %p", impl, node->driver_node);
|
||||
had_driver = node != node->driver_node;
|
||||
|
||||
/* remove ourself as a follower from the driver node */
|
||||
spa_list_remove(&node->follower_link);
|
||||
|
|
@ -2467,6 +2470,10 @@ void pw_impl_node_destroy(struct pw_impl_node *node)
|
|||
spa_hook_remove(&node->global_listener);
|
||||
pw_global_destroy(node->global);
|
||||
}
|
||||
if (active || had_driver)
|
||||
pw_context_recalc_graph(context,
|
||||
"active node destroy");
|
||||
|
||||
pw_context_thaw_recalc_graph(context, "node destroy");
|
||||
|
||||
pw_log_debug("%p: free", node);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue