mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
filter-chain: move data allocation out of the link loop
The port data allocation does not depend on the links so move it out of the loop.
This commit is contained in:
parent
d1cd199f16
commit
ac67475e64
1 changed files with 14 additions and 14 deletions
|
|
@ -1654,7 +1654,6 @@ static int setup_output_port(struct graph *graph, struct port *port)
|
||||||
struct link *link;
|
struct link *link;
|
||||||
uint32_t i, n_hndl = port->node->n_hndl;
|
uint32_t i, n_hndl = port->node->n_hndl;
|
||||||
|
|
||||||
spa_list_for_each(link, &port->link_list, output_link) {
|
|
||||||
for (i = 0; i < n_hndl; i++) {
|
for (i = 0; i < n_hndl; i++) {
|
||||||
float *data;
|
float *data;
|
||||||
if ((data = port->audio_data[i]) == NULL) {
|
if ((data = port->audio_data[i]) == NULL) {
|
||||||
|
|
@ -1668,8 +1667,9 @@ static int setup_output_port(struct graph *graph, struct port *port)
|
||||||
port->audio_data[i]);
|
port->audio_data[i]);
|
||||||
d->connect_port(port->node->hndl[i], port->p, data);
|
d->connect_port(port->node->hndl[i], port->p, data);
|
||||||
}
|
}
|
||||||
|
spa_list_for_each(link, &port->link_list, output_link)
|
||||||
link->input->node->n_deps--;
|
link->input->node->n_deps--;
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue