mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-15 07:00:05 -05:00
context: use smallest fraction for largest rate
To find the largest rate, we need to select the smallest fraction. This fixes the case where 44100Hz was selected when there are 2 nodes, one suggesting 44.1Khz and another 48Khz. After this, 48KHz is selected.
This commit is contained in:
parent
bfcbeccec2
commit
e1b6a4237f
1 changed files with 2 additions and 2 deletions
|
|
@ -1365,10 +1365,10 @@ again:
|
|||
fraction_compare(&s->max_latency, &max_latency) < 0))
|
||||
max_latency = s->max_latency;
|
||||
|
||||
/* largest rate */
|
||||
/* largest rate, which is in fact the smallest fraction */
|
||||
if (rate.denom == 0 ||
|
||||
(s->rate.denom > 0 &&
|
||||
fraction_compare(&s->rate, &rate) > 0))
|
||||
fraction_compare(&s->rate, &rate) < 0))
|
||||
rate = s->rate;
|
||||
|
||||
if (s->active)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue