From 344be779b14ae7871dd87600244e12b8fbc6931c Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 7 Feb 2023 14:14:55 +0100 Subject: [PATCH] filter-chain: support single copy plugin When input and output are linked with a copy function, don't disable the node but add it to the valid graph inputs. --- src/modules/module-filter-chain.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/modules/module-filter-chain.c b/src/modules/module-filter-chain.c index de4f813d0..7fd6acbbe 100644 --- a/src/modules/module-filter-chain.c +++ b/src/modules/module-filter-chain.c @@ -1938,6 +1938,8 @@ static int setup_graph(struct graph *graph, struct spa_json *inputs, struct spa_ pw_log_error("input port %s not found", v); goto error; } else { + bool disabled = false; + desc = port->node->desc; d = desc->desc; if (i == 0 && port->external != SPA_ID_INVALID) { @@ -1972,12 +1974,14 @@ static int setup_graph(struct graph *graph, struct spa_json *inputs, struct spa_ gp->hndl = &peer->node->hndl[i]; gp->port = peer->p; gp->next = true; + disabled = true; } if (gp != NULL) gp->next = false; } - port->node->disabled = true; - } else { + port->node->disabled = disabled; + } + if (!disabled) { pw_log_info("input port %s[%d]:%s", port->node->name, i, d->ports[port->p].name); port->external = graph->n_input;