mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
link: avoid multiple concurrent negotiations
When multiple links are created at the same time for the same port, we get into a race where multiple links will try to set a format asynchronously and eventually break the links. Avoid this by marking the port as busy for as long as an async format or buffer is pending and avoid starting new link negotiation when one of the ports is busy. This problem was observed when ardour6 tries to link all device capture ports to its single monitor port.
This commit is contained in:
parent
2d88ad179a
commit
f0bc0d068e
2 changed files with 92 additions and 18 deletions
|
|
@ -836,6 +836,7 @@ struct pw_impl_port {
|
|||
} rt; /**< data only accessed from the data thread */
|
||||
unsigned int added:1;
|
||||
unsigned int destroying:1;
|
||||
int busy_count;
|
||||
|
||||
struct spa_latency_info latency[2]; /**< latencies */
|
||||
unsigned int have_latency_param:1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue