mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
filter-graph: clear external field in unsetup_graph
Without this change the playback with different number of channels fails with `input port %s[%d]:%s already used as input %d, use mixer` on the first port. Signed-off-by: Martin Geier <martin.geier@streamunlimited.com> Fixes #4866
This commit is contained in:
parent
a0e27314c6
commit
c99311e822
1 changed files with 15 additions and 0 deletions
|
|
@ -1744,6 +1744,9 @@ error:
|
|||
|
||||
static void unsetup_graph(struct graph *graph)
|
||||
{
|
||||
struct node *node;
|
||||
uint32_t i;
|
||||
|
||||
free(graph->input);
|
||||
graph->input = NULL;
|
||||
free(graph->output);
|
||||
|
|
@ -1751,7 +1754,19 @@ static void unsetup_graph(struct graph *graph)
|
|||
free(graph->hndl);
|
||||
graph->hndl = NULL;
|
||||
|
||||
spa_list_for_each(node, &graph->node_list, link) {
|
||||
struct descriptor *desc = node->desc;
|
||||
for (i = 0; i < desc->n_input; i++) {
|
||||
struct port *port = &node->input_port[i];
|
||||
port->external = SPA_ID_INVALID;
|
||||
}
|
||||
for (i = 0; i < desc->n_output; i++) {
|
||||
struct port *port = &node->output_port[i];
|
||||
port->external = SPA_ID_INVALID;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int setup_graph(struct graph *graph)
|
||||
{
|
||||
struct impl *impl = graph->impl;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue