mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-14 06:59:57 -05:00
context: fix erroneous clamping of quantum for high sample rates
When calculating the adjusted max quantum based off of max_latency, the first multiplication can overflow uint32_t, leading to the quantum being wrongfully clamped down. Signed-off-by: Martin Louazel <martin.louazel@streamunlimited.com>
This commit is contained in:
parent
2bf48487cb
commit
8ee1b4b614
1 changed files with 1 additions and 1 deletions
|
|
@ -1791,7 +1791,7 @@ again:
|
|||
/* calculate desired quantum. Don't limit to the max_latency when we are
|
||||
* going to force a quantum or rate and reconfigure the nodes. */
|
||||
if (max_latency.denom != 0 && !force_quantum && !force_rate) {
|
||||
uint32_t tmp = (max_latency.num * current_rate / max_latency.denom);
|
||||
uint32_t tmp = ((uint64_t)max_latency.num * current_rate / max_latency.denom);
|
||||
if (tmp < node_max_quantum)
|
||||
node_max_quantum = tmp;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue