diff --git a/src/pipewire/context.c b/src/pipewire/context.c index fbb868dfa..f407212a8 100644 --- a/src/pipewire/context.c +++ b/src/pipewire/context.c @@ -944,13 +944,14 @@ static int collect_nodes(struct pw_context *context, struct pw_impl_node *driver spa_list_for_each(l, &p->links, input_link) { t = l->output->node; - if (l->passive) - pw_impl_link_prepare(l); - else if (t->active) - driver->passive = n->passive = false; - if (t->visited || !t->active) continue; + + pw_impl_link_prepare(l); + + if (!l->passive) + driver->passive = n->passive = false; + if (l->prepared) { t->visited = true; spa_list_append(&queue, &t->sort_link); @@ -961,13 +962,12 @@ static int collect_nodes(struct pw_context *context, struct pw_impl_node *driver spa_list_for_each(l, &p->links, output_link) { t = l->input->node; - if (l->passive) - pw_impl_link_prepare(l); - else if (t->active) - driver->passive = n->passive = false; - if (t->visited || !t->active) continue; + + if (!l->passive) + driver->passive = n->passive = false; + if (l->prepared) { t->visited = true; spa_list_append(&queue, &t->sort_link);