mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
resample: limit the amount of taps
So that we don't allocate too much space but also don't cause an overflow in the indexes.
This commit is contained in:
parent
e4b030fafa
commit
0cf6760ee0
1 changed files with 1 additions and 0 deletions
|
|
@ -344,6 +344,7 @@ int resample_native_init(struct resample *r)
|
|||
scale = SPA_MIN(q->cutoff * out_rate / in_rate, 1.0);
|
||||
/* multiple of 8 taps to ease simd optimizations */
|
||||
n_taps = SPA_ROUND_UP_N((uint32_t)ceil(q->n_taps / scale), 8);
|
||||
n_taps = SPA_MIN(n_taps, 1u << 18);
|
||||
|
||||
/* try to get at least 256 phases so that interpolation is
|
||||
* accurate enough when activated */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue