Files
ffmpeg/libswresample/tests
Ivan Grigorev bdbb580d9c swresample/tests: add resample realloc regression test
Add a regression test exercising the swr_convert(N) -> swr_convert(2N)
edge case: the second call reuses the internal preout buffer at full
capacity, with no trailing slack from swri_realloc_audio()'s amortized
doubling. internal_sample_fmt is forced to S16P to reach the int16 SIMD
resample path, where ff_resample_common_int16_sse2 overruns its
destination by 2 bytes on the last iteration.

Without a resampler fix this test fails under valgrind/ASAN with a
heap-buffer-overflow (Invalid write of size 4, 2 bytes past the end).

Signed-off-by: Ivan Grigorev <ivangrigoriev@meta.com>
2026-06-14 15:34:43 +00:00
..