aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2015-04-15 21:10:49 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-04-16 23:05:47 +0200
commit8297d87eecbf19821a8f6f1e230f025394f281d2 (patch)
tree5709575837009c36f32e98bdfc8b84880935ee49
parentbc4fee7f2a51635fa3c0f61d1e5164da1efeded3 (diff)
downloadffmpeg-8297d87eecbf19821a8f6f1e230f025394f281d2.tar.gz
fate: add mp3 gapless test
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--tests/Makefile1
-rwxr-xr-xtests/fate-run.sh22
-rw-r--r--tests/fate/gapless.mak7
-rw-r--r--tests/ref/fate/gapless-mp34
4 files changed, 34 insertions, 0 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 8505211f06..cffa541213 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -117,6 +117,7 @@ include $(SRC_PATH)/tests/fate/filter-audio.mak
include $(SRC_PATH)/tests/fate/filter-video.mak
include $(SRC_PATH)/tests/fate/flac.mak
include $(SRC_PATH)/tests/fate/fft.mak
+include $(SRC_PATH)/tests/fate/gapless.mak
include $(SRC_PATH)/tests/fate/gif.mak
include $(SRC_PATH)/tests/fate/h264.mak
include $(SRC_PATH)/tests/fate/hevc.mak
diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index 74f264533d..c68c389826 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -220,6 +220,28 @@ pixfmts(){
test=$outertest
}
+gapless(){
+ sample=$(target_path $1)
+ extra_args=$2
+
+ decfile1="${outdir}/${test}.out-1"
+ decfile2="${outdir}/${test}.out-2"
+ cleanfiles="$cleanfiles $decfile1 $decfile2"
+
+ # large enough to make ffmpeg.c seek to the start of the file
+ start_offset=-1
+
+ # test packet data
+ ffmpeg -i "$sample" $extra_args -flags +bitexact -c:a copy -f framecrc -y $decfile1
+ do_md5sum $decfile1
+ # test decoded (and cut) data
+ ffmpeg -i "$sample" $extra_args -flags +bitexact -f wav md5:
+ # the same as aboce again, with seeking to the start
+ ffmpeg -ss $start_offset -i "$sample" $extra_args -flags +bitexact -c:a copy -f framecrc -y $decfile2
+ do_md5sum $decfile2
+ ffmpeg -ss $start_offset -i "$sample" $extra_args -flags +bitexact -f wav md5:
+}
+
mkdir -p "$outdir"
# Disable globbing: command arguments may contain globbing characters and
diff --git a/tests/fate/gapless.mak b/tests/fate/gapless.mak
new file mode 100644
index 0000000000..7f0848d4cd
--- /dev/null
+++ b/tests/fate/gapless.mak
@@ -0,0 +1,7 @@
+FATE_GAPLESS-$(CONFIG_MP3_DEMUXER) += fate-gapless-mp3
+fate-gapless-mp3: CMD = gapless $(TARGET_SAMPLES)/gapless/gapless.mp3 "-usetoc 1"
+
+FATE_GAPLESS = $(FATE_GAPLESS-yes)
+
+FATE_SAMPLES_AVCONV += $(FATE_GAPLESS)
+fate-gapless: $(FATE_GAPLESS)
diff --git a/tests/ref/fate/gapless-mp3 b/tests/ref/fate/gapless-mp3
new file mode 100644
index 0000000000..9add70f9ba
--- /dev/null
+++ b/tests/ref/fate/gapless-mp3
@@ -0,0 +1,4 @@
+d5c88cf38416329a052a9b0cb140fb4c *tests/data/fate/gapless-mp3.out-1
+3e41cbd4dcd511d3155234684252beab
+68f040b12d79c71e3b2e8ba90a9cbd96 *tests/data/fate/gapless-mp3.out-2
+3e41cbd4dcd511d3155234684252beab \ No newline at end of file