context: only make active nodes runnable

Only try to make active nodes runnable. This can happen when the node is
destroyed.

Avoids a -EIO error when destroying nodes from pavucontrol.
This commit is contained in:
Wim Taymans 2025-10-06 11:48:40 +02:00
parent b66d49702f
commit 984b2d296e

View file

@ -1114,7 +1114,7 @@ static int collect_nodes(struct pw_context *context, struct pw_impl_node *node,
* made the driver active. If the node is a leaf it can not be activated in any other
* way and we will also make it, and all its peers, runnable */
spa_list_for_each(n, collect, sort_link) {
if (!n->driver && n->driver_node->runnable && !n->runnable && n->leaf) {
if (!n->driver && n->driver_node->runnable && !n->runnable && n->leaf && n->active) {
n->runnable = true;
run_nodes(context, n, collect, PW_DIRECTION_OUTPUT, 0);
run_nodes(context, n, collect, PW_DIRECTION_INPUT, 0);