void-packages/srcpkgs/pipewire/patches/6df32666b4.patch

63 lines
2.3 KiB
Diff

From 6df32666b44b5174aace3dcff39f39a58eba508f Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Thu, 20 May 2021 11:22:04 +0200
Subject: [PATCH] filter-chain: check external ports only once
When we duplicate the pipeline to match the channels, only check
if a port was used only once for the first instance. Makes
demonic filter work again.
---
src/modules/module-filter-chain.c | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/src/modules/module-filter-chain.c b/src/modules/module-filter-chain.c
index b1e727069..bb346b6d8 100644
--- a/src/modules/module-filter-chain.c
+++ b/src/modules/module-filter-chain.c
@@ -972,16 +972,6 @@ static int parse_link(struct graph *graph, struct spa_json *json)
pw_log_error("unknown input port %s", input);
return -ENOENT;
}
- if (in_port->external != SPA_ID_INVALID) {
- pw_log_info("%s already used as graph input %d, use mixer",
- input, in_port->external);
- return -EINVAL;
- }
- if (out_port->external != SPA_ID_INVALID) {
- pw_log_info("%s already used as graph output %d, use copy",
- output, out_port->external);
- return -EINVAL;
- }
if (in_port->n_links > 0) {
pw_log_info("Can't have more than 1 link to %s, use a mixer", input);
return -ENOTSUP;
@@ -1334,10 +1324,10 @@ static int setup_graph(struct graph *graph, struct spa_json *inputs, struct spa_
} else {
desc = port->node->desc;
d = desc->desc;
- if (port->external != SPA_ID_INVALID) {
+ if (i == 0 && port->external != SPA_ID_INVALID) {
pw_log_error("input port %s[%d]:%s already used as input %d, use mixer",
port->node->name, i, d->PortNames[port->p],
- graph->n_input);
+ port->external);
res = -EBUSY;
goto error;
}
@@ -1382,10 +1372,10 @@ static int setup_graph(struct graph *graph, struct spa_json *inputs, struct spa_
} else {
desc = port->node->desc;
d = desc->desc;
- if (port->external != SPA_ID_INVALID) {
+ if (i == 0 && port->external != SPA_ID_INVALID) {
pw_log_error("output port %s[%d]:%s already used as output %d, use copy",
port->node->name, i, d->PortNames[port->p],
- graph->n_output);
+ port->external);
res = -EBUSY;
goto error;
}
--
GitLab