This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 584aedb4c73ef631d9be2e40d9daf051828320fa Author: Romain Beauxis <[email protected]> AuthorDate: Thu Nov 12 21:39:12 2026 -0600 Commit: Romain Beauxis <[email protected]> CommitDate: Sun Nov 15 15:37:13 2026 +0000 tests/fate/mp3: add a test for MPEG audio sample rate changes The test encodes MP2 at 44.1 kHz then 48 kHz, decodes the two streams concatenated, as MPEG audio files joined without re-encoding play, and prints the sample rate of each decoded frame through ashowinfo. --- tests/fate/mp3.mak | 27 ++++++++++++++++++++++++++ tests/ref/fate/mpegaudiodec-sample-rate-change | 6 ++++++ 2 files changed, 33 insertions(+) diff --git a/tests/fate/mp3.mak b/tests/fate/mp3.mak index edce1f98e6..4521c16e90 100644 --- a/tests/fate/mp3.mak +++ b/tests/fate/mp3.mak @@ -78,3 +78,30 @@ fate-mpegaudiodecheader-libmp3lame: CMD = run_with_temp "$(FFMPEG) -nostdin -hid FATE_SAMPLES_FFMPEG += $(FATE_MPA_HEADER-yes) FATE_FFMPEG += $(FATE_MPA_HEADER_LAME-yes) fate-mpegaudiodecheader: $(FATE_MPA_HEADER-yes) $(FATE_MPA_HEADER_LAME-yes) + +# The reference keeps only the rate of each frame from the ashowinfo log. +MPA_RATE_CHANGE = tests/data/fate/mpegaudiodec-sample-rate-change +MPA_RATE_CHANGE_44100 = $(TARGET_PATH)/$(MPA_RATE_CHANGE).44100.mp2 +MPA_RATE_CHANGE_48000 = $(TARGET_PATH)/$(MPA_RATE_CHANGE).48000.mp2 +MPA_RATE_CHANGE_DEPS = LAVFI_INDEV ANULLSRC_FILTER AFORMAT_FILTER \ + ARESAMPLE_FILTER ASHOWINFO_FILTER PCM_U8_DECODER \ + MP2_ENCODER MP2_DECODER MP2_MUXER MP3_DEMUXER \ + MPEGAUDIO_PARSER PCM_S16LE_ENCODER NULL_MUXER \ + FILE_PROTOCOL CONCAT_PROTOCOL +FATE_MPA_RATE_CHANGE-$(call ALLYES, $(MPA_RATE_CHANGE_DEPS)) += \ + fate-mpegaudiodec-sample-rate-change +fate-mpegaudiodec-sample-rate-change: CMD = \ + ffmpeg -auto_conversion_filters -v error -f lavfi \ + -i anullsrc=r=44100:cl=stereo:n=1152:d=0.07 \ + -c:a mp2 -b:a 128k -f mp2 -y $(MPA_RATE_CHANGE_44100) && \ + ffmpeg -auto_conversion_filters -v error -f lavfi \ + -i anullsrc=r=48000:cl=stereo:n=1152:d=0.07 \ + -c:a mp2 -b:a 128k -f mp2 -y $(MPA_RATE_CHANGE_48000) && \ + ffmpeg -auto_conversion_filters -hide_banner \ + -probesize 32 -analyzeduration 1 -c:a mp2 \ + -i "concat:$(MPA_RATE_CHANGE_44100)|$(MPA_RATE_CHANGE_48000)" \ + -af ashowinfo -c:a pcm_s16le -f null - 2>$(MPA_RATE_CHANGE).log && \ + sed -n "s/.* rate:\([0-9]*\) nb_samples:.*/\1/p" $(MPA_RATE_CHANGE).log +fate-mpegaudiodec-sample-rate-change: CLEANFILES = \ + $(addprefix $(MPA_RATE_CHANGE),.44100.mp2 .48000.mp2 .log) +FATE_FFMPEG += $(FATE_MPA_RATE_CHANGE-yes) diff --git a/tests/ref/fate/mpegaudiodec-sample-rate-change b/tests/ref/fate/mpegaudiodec-sample-rate-change new file mode 100644 index 0000000000..b7d84f4651 --- /dev/null +++ b/tests/ref/fate/mpegaudiodec-sample-rate-change @@ -0,0 +1,6 @@ +44100 +44100 +44100 +44100 +48000 +48000 -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
