mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
latency: fix latency combine calculations
0 is a valid min latency so we can't use it as an unset value. Use some large value instead and when nothing was configured, assume it is 0. Fixes #1839
This commit is contained in:
parent
401e56699d
commit
97cad7284a
4 changed files with 32 additions and 7 deletions
|
|
@ -1926,11 +1926,14 @@ static void default_latency(struct client *c, enum spa_direction direction,
|
|||
enum spa_direction other;
|
||||
struct port *p;
|
||||
|
||||
*latency = SPA_LATENCY_INFO(direction);
|
||||
other = SPA_DIRECTION_REVERSE(direction);
|
||||
|
||||
spa_latency_info_combine_start(latency, direction);
|
||||
|
||||
spa_list_for_each(p, &c->ports[other], link)
|
||||
spa_latency_info_combine(latency, &p->object->port.latency[direction]);
|
||||
|
||||
spa_latency_info_combine_finish(latency);
|
||||
}
|
||||
|
||||
/* called from thread-loop */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue