mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-07 13:30:09 -05:00
context: don't move passive nodes to fallback driver
Don't move passive nodes to the fallback driver when !always_process. When we have a fallback driver, check if the node we want to add to it is not a passive node (by doing collect_nodes), if it's passive and doesn't always need to be processed, remove it from the driver. This fixes the issue where nodes that are maked as want_driver are unconditionally moved to the fallback driver (and activated) even if there is nothing linked to them (passive). Fixes #2309
This commit is contained in:
parent
1809a84562
commit
ae194b6fe7
1 changed files with 12 additions and 2 deletions
|
|
@ -1191,11 +1191,21 @@ again:
|
|||
context, n, n->name, n->active, n->want_driver, target);
|
||||
|
||||
t = n->want_driver && n->active ? target : NULL;
|
||||
|
||||
if (t != NULL && !n->always_process) {
|
||||
/* first do a check without moving the node to
|
||||
* the target driver to see if we are passive */
|
||||
collect_nodes(context, n);
|
||||
if (n->passive)
|
||||
t = NULL;
|
||||
}
|
||||
pw_impl_node_set_driver(n, t);
|
||||
if (t == NULL)
|
||||
if (t == NULL) {
|
||||
/* no driver, make sure the node stops */
|
||||
ensure_state(n, false);
|
||||
}
|
||||
else {
|
||||
/* we configured a driver, move all linked
|
||||
* nodes to it as well */
|
||||
if (n->always_process)
|
||||
t->passive = false;
|
||||
collect_nodes(context, n);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue