Commit 389b4a72 authored by Wim Taymans's avatar Wim Taymans
Browse files

context: keep passive links negotiated

Always make sure passive links are prepared so we can follow them
and use them to activate nodes.
parent 741a2b3d
Pipeline #162197 passed with stages
in 1 minute and 18 seconds
......@@ -798,18 +798,22 @@ static int collect_nodes(struct pw_impl_node *driver)
spa_list_init(&queue);
spa_list_append(&queue, &driver->sort_link);
driver->visited = true;
driver->passive = true;
spa_list_consume(n, &queue, sort_link) {
spa_list_remove(&n->sort_link);
pw_impl_node_set_driver(n, driver);
n->passive = true;
spa_list_for_each(p, &n->input_ports, link) {
spa_list_for_each(l, &p->links, input_link) {
t = l->output->node;
if (!l->passive)
driver->passive = false;
if (l->prepared && !t->visited && t->active) {
driver->passive = n->passive = false;
else
pw_impl_link_prepare(l);
if (t->visited || !t->active)
continue;
if (l->prepared) {
t->visited = true;
spa_list_append(&queue, &t->sort_link);
}
......@@ -819,8 +823,12 @@ static int collect_nodes(struct pw_impl_node *driver)
spa_list_for_each(l, &p->links, output_link) {
t = l->input->node;
if (!l->passive)
driver->passive = false;
if (l->prepared && !t->visited && t->active) {
driver->passive = n->passive = false;
else
pw_impl_link_prepare(l);
if (t->visited || !t->active)
continue;
if (l->prepared) {
t->visited = true;
spa_list_append(&queue, &t->sort_link);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment