mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
link: improve clear_buffers
Clear the right mix port Don't clear ouput ports when busy
This commit is contained in:
parent
533c299244
commit
6f095f4cc5
1 changed files with 4 additions and 1 deletions
|
|
@ -929,8 +929,11 @@ static void clear_port_buffers(struct pw_link *link, struct pw_port *port)
|
|||
|
||||
pw_log_debug("%d %p", spa_list_is_empty(&port->links), port->allocation.mem);
|
||||
|
||||
if (port->direction == PW_DIRECTION_OUTPUT && !spa_list_is_empty(&port->links))
|
||||
return;
|
||||
|
||||
if ((res = pw_port_use_buffers(port,
|
||||
link->rt.mix[SPA_DIRECTION_INPUT].port.port_id, NULL, 0)) < 0)
|
||||
link->rt.mix[port->direction].port.port_id, NULL, 0)) < 0)
|
||||
pw_log_warn("link %p: port %p clear error %s", link, port, spa_strerror(res));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue