context: Don't stop at driver nodes, only driving nodes

Don't stop collecting runnable nodes when we find a driver, only a
driving node. Otherwise we would skip nodes between virtual sinks and
the real sink when the virtual sink is not driving.

Fixes #3220
This commit is contained in:
Wim Taymans 2023-05-16 16:44:27 +02:00
parent 957470bd9f
commit 318bb0b442

View file

@ -803,7 +803,7 @@ static inline int run_nodes(struct pw_context *context, struct pw_impl_node *nod
pw_log_debug(" peer %p: '%s'", t, t->name); pw_log_debug(" peer %p: '%s'", t, t->name);
t->runnable = true; t->runnable = true;
if (!t->driver) if (!t->driving)
run_nodes(context, t, nodes); run_nodes(context, t, nodes);
} }
} }
@ -816,7 +816,7 @@ static inline int run_nodes(struct pw_context *context, struct pw_impl_node *nod
pw_log_debug(" peer %p: '%s'", t, t->name); pw_log_debug(" peer %p: '%s'", t, t->name);
t->runnable = true; t->runnable = true;
if (!t->driver) if (!t->driving)
run_nodes(context, t, nodes); run_nodes(context, t, nodes);
} }
} }
@ -834,7 +834,7 @@ static inline int run_nodes(struct pw_context *context, struct pw_impl_node *nod
pw_log_debug(" group %p: '%s'", t, t->name); pw_log_debug(" group %p: '%s'", t, t->name);
t->runnable = true; t->runnable = true;
if (!t->driver) if (!t->driving)
run_nodes(context, t, nodes); run_nodes(context, t, nodes);
} }
} }
@ -937,7 +937,7 @@ static int collect_nodes(struct pw_context *context, struct pw_impl_node *node,
pw_log_debug(" next node %p: '%s' runnable:%u", n, n->name, n->runnable); pw_log_debug(" next node %p: '%s' runnable:%u", n, n->name, n->runnable);
} }
spa_list_for_each(n, collect, sort_link) spa_list_for_each(n, collect, sort_link)
if (!n->driver && n->runnable) if (!n->driving && n->runnable)
run_nodes(context, n, collect); run_nodes(context, n, collect);
return 0; return 0;