diff --git a/src/pipewire/context.c b/src/pipewire/context.c index 9d9b629ae..ec02558d8 100644 --- a/src/pipewire/context.c +++ b/src/pipewire/context.c @@ -800,6 +800,8 @@ static inline int run_nodes(struct pw_context *context, struct pw_impl_node *nod pw_log_debug("node %p: '%s' direction:%s", node, node->name, pw_direction_as_string(direction)); + SPA_FLAG_SET(node->checked, 1u<input_ports, link) { spa_list_for_each(l, &p->links, input_link) { @@ -834,7 +836,8 @@ static inline int run_nodes(struct pw_context *context, struct pw_impl_node *nod * them. */ if (node->link_group != NULL) { spa_list_for_each(t, nodes, sort_link) { - if (t->exported || !t->active || t->runnable) + if (t->exported || !t->active || + SPA_FLAG_IS_SET(t->checked, 1u<link_group, node->link_group)) continue; @@ -1201,6 +1204,7 @@ again: /* clean up the flags first */ spa_list_for_each(n, &context->node_list, link) { n->visited = false; + n->checked = 0; n->runnable = n->always_process && n->active; } diff --git a/src/pipewire/private.h b/src/pipewire/private.h index 90993ba16..26dce7e76 100644 --- a/src/pipewire/private.h +++ b/src/pipewire/private.h @@ -676,6 +676,7 @@ struct pw_impl_node { unsigned int trigger:1; /**< has the TRIGGER property and needs an extra * trigger to start processing. */ unsigned int can_suspend:1; + unsigned int checked; /**< for sorting */ uint32_t port_user_data_size; /**< extra size for port user data */