mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-21 12:32:31 +00:00
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>
29 lines
922 B
Makefile
29 lines
922 B
Makefile
NAME = swresample
|
|
DESC = FFmpeg audio resampling library
|
|
FFLIBS = avutil
|
|
|
|
HEADERS = swresample.h \
|
|
version.h \
|
|
version_major.h \
|
|
|
|
OBJS = audioconvert.o \
|
|
dither.o \
|
|
options.o \
|
|
rematrix.o \
|
|
resample.o \
|
|
resample_dsp.o \
|
|
swresample.o \
|
|
swresample_frame.o \
|
|
version.o \
|
|
|
|
OBJS-$(CONFIG_LIBSOXR) += soxr_resample.o
|
|
|
|
# Objects duplicated from other libraries for shared builds
|
|
SHLIBOBJS += log2_tab.o
|
|
|
|
# Windows resource file
|
|
SHLIBOBJS-$(HAVE_GNU_WINDRES) += swresampleres.o
|
|
|
|
TESTPROGS = swresample \
|
|
swresample_resample_realloc \
|