mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-22 06:59:59 -05:00
impl-port: clear peer buffers in suspend
When we clear the buffers on an output port when we clear the port format in suspend, also clear the buffers shared by the peer input port mixers because else they would reference old stale buffers. Fixes #2914
This commit is contained in:
parent
6b228944f7
commit
6116ef8484
1 changed files with 6 additions and 0 deletions
|
|
@ -1473,6 +1473,12 @@ int pw_impl_port_set_param(struct pw_impl_port *port, uint32_t id, uint32_t flag
|
||||||
port->added = false;
|
port->added = false;
|
||||||
}
|
}
|
||||||
/* setting the format always destroys the negotiated buffers */
|
/* setting the format always destroys the negotiated buffers */
|
||||||
|
if (port->direction == PW_DIRECTION_OUTPUT) {
|
||||||
|
struct pw_impl_link *l;
|
||||||
|
/* remove all buffers shared with an output port peer */
|
||||||
|
spa_list_for_each(l, &port->links, output_link)
|
||||||
|
pw_impl_port_use_buffers(l->input, &l->rt.in_mix, 0, NULL, 0);
|
||||||
|
}
|
||||||
pw_buffers_clear(&port->buffers);
|
pw_buffers_clear(&port->buffers);
|
||||||
pw_buffers_clear(&port->mix_buffers);
|
pw_buffers_clear(&port->mix_buffers);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue