diff options
author | wm4 <nfxjfg@googlemail.com> | 2015-04-22 19:57:02 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-04-23 12:56:31 +0200 |
commit | 60191e3aec6a65ffcb8af9ad389df7ce31293e6d (patch) | |
tree | 1e9c9270ca4e2821e7e091e5c30a0400fad690e2 | |
parent | df287f3e4362982807d80a62e3122e2477b85892 (diff) | |
download | ffmpeg-60191e3aec6a65ffcb8af9ad389df7ce31293e6d.tar.gz |
fate: add mp3 CBR seek test
This tests the "old", now non-default seek mode, and this requires a
special extra argument.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/seek-test.c | 2 | ||||
-rw-r--r-- | tests/fate/seek.mak | 13 | ||||
-rw-r--r-- | tests/ref/seek/extra-mp3 | 53 |
3 files changed, 65 insertions, 3 deletions
diff --git a/libavformat/seek-test.c b/libavformat/seek-test.c index 8b0611db71..1dd041d851 100644 --- a/libavformat/seek-test.c +++ b/libavformat/seek-test.c @@ -76,6 +76,8 @@ int main(int argc, char **argv) frame_count = atoi(argv[i+1]); } else if(!strcmp(argv[i], "-duration")){ duration = atoi(argv[i+1]); + } else if(!strcmp(argv[i], "-usetoc")) { + av_dict_set(&format_opts, "usetoc", argv[i+1], 0); } else { argc = 1; } diff --git a/tests/fate/seek.mak b/tests/fate/seek.mak index 3be04ca089..dfb2e84a1e 100644 --- a/tests/fate/seek.mak +++ b/tests/fate/seek.mak @@ -241,11 +241,18 @@ fate-seek-lavf-yuv4mpeg: SRC = lavf/lavf.y4m FATE_SEEK += $(FATE_SEEK_LAVF-yes:%=fate-seek-lavf-%) -$(FATE_SEEK) $(FATE_SAMPLES_SEEK): libavformat/seek-test$(EXESUF) +# extra files + +FATE_SEEK_EXTRA-$(CONFIG_MP3_DEMUXER) += fate-seek-extra-mp3 +fate-seek-extra-mp3: CMD = run libavformat/seek-test$(EXESUF) $(TARGET_SAMPLES)/gapless/gapless.mp3 -usetoc 0 +FATE_SEEK_EXTRA += $(FATE_SEEK_EXTRA-yes) + + +$(FATE_SEEK) $(FATE_SAMPLES_SEEK) $(FATE_SEEK_EXTRA): libavformat/seek-test$(EXESUF) $(FATE_SEEK) $(FATE_SAMPLES_SEEK): CMD = run libavformat/seek-test$(EXESUF) $(TARGET_PATH)/tests/data/$(SRC) $(FATE_SEEK) $(FATE_SAMPLES_SEEK): fate-seek-%: fate-% fate-seek-%: REF = $(SRC_PATH)/tests/ref/seek/$(@:fate-seek-%=%) FATE_AVCONV += $(FATE_SEEK) -FATE_SAMPLES_AVCONV += $(FATE_SAMPLES_SEEK) -fate-seek: $(FATE_SEEK) $(FATE_SAMPLES_SEEK) +FATE_SAMPLES_AVCONV += $(FATE_SAMPLES_SEEK) $(FATE_SEEK_EXTRA) +fate-seek: $(FATE_SEEK) $(FATE_SAMPLES_SEEK) $(FATE_SEEK_EXTRA) diff --git a/tests/ref/seek/extra-mp3 b/tests/ref/seek/extra-mp3 new file mode 100644 index 0000000000..981ac02ca8 --- /dev/null +++ b/tests/ref/seek/extra-mp3 @@ -0,0 +1,53 @@ +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1451 size: 440 +ret: 0 st:-1 flags:0 ts:-1.000000 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1451 size: 440 +ret: 0 st:-1 flags:1 ts: 1.894167 +ret: 0 st: 0 flags:1 dts: 1.880816 pts: 1.880816 pos: 31544 size: 418 +ret: 0 st: 0 flags:0 ts: 0.788334 +ret: 0 st: 0 flags:1 dts: 0.809796 pts: 0.809796 pos: 14407 size: 418 +ret: 0 st: 0 flags:1 ts:-0.317499 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1451 size: 440 +ret: 0 st:-1 flags:0 ts: 2.576668 +ret: 0 st: 0 flags:1 dts: 2.586122 pts: 2.586122 pos: 42828 size: 418 +ret: 0 st:-1 flags:1 ts: 1.470835 +ret: 0 st: 0 flags:1 dts: 1.462857 pts: 1.462857 pos: 24856 size: 418 +ret: 0 st: 0 flags:0 ts: 0.365002 +ret: 0 st: 0 flags:1 dts: 0.365714 pts: 0.365714 pos: 7302 size: 418 +ret: 0 st: 0 flags:1 ts:-0.740831 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1451 size: 440 +ret: 0 st:-1 flags:0 ts: 2.153336 +ret: 0 st: 0 flags:1 dts: 2.168163 pts: 2.168163 pos: 36141 size: 418 +ret: 0 st:-1 flags:1 ts: 1.047503 +ret: 0 st: 0 flags:1 dts: 1.044898 pts: 1.044898 pos: 18169 size: 418 +ret: 0 st: 0 flags:0 ts:-0.058330 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1451 size: 440 +ret: 0 st: 0 flags:1 ts: 2.835837 +ret: 0 st: 0 flags:1 dts: 2.821224 pts: 2.821224 pos: 46590 size: 418 +ret: 0 st:-1 flags:0 ts: 1.730004 +ret: 0 st: 0 flags:1 dts: 1.750204 pts: 1.750204 pos: 29454 size: 418 +ret: 0 st:-1 flags:1 ts: 0.624171 +ret: 0 st: 0 flags:1 dts: 0.600816 pts: 0.600816 pos: 11064 size: 418 +ret: 0 st: 0 flags:0 ts:-0.481662 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1451 size: 440 +ret: 0 st: 0 flags:1 ts: 2.412505 +ret: 0 st: 0 flags:1 dts: 2.403265 pts: 2.403265 pos: 39903 size: 418 +ret: 0 st:-1 flags:0 ts: 1.306672 +ret: 0 st: 0 flags:1 dts: 1.332245 pts: 1.332245 pos: 22766 size: 418 +ret: 0 st:-1 flags:1 ts: 0.200839 +ret: 0 st: 0 flags:1 dts: 0.182857 pts: 0.182857 pos: 4376 size: 418 +ret: 0 st: 0 flags:0 ts:-0.904994 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1451 size: 440 +ret: 0 st: 0 flags:1 ts: 1.989173 +ret: 0 st: 0 flags:1 dts: 1.985306 pts: 1.985306 pos: 33215 size: 418 +ret: 0 st:-1 flags:0 ts: 0.883340 +ret: 0 st: 0 flags:1 dts: 0.888163 pts: 0.888163 pos: 15661 size: 418 +ret: 0 st:-1 flags:1 ts:-0.222493 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1451 size: 440 +ret: 0 st: 0 flags:0 ts: 2.671674 +ret: 0 st: 0 flags:1 dts: 2.690612 pts: 2.690612 pos: 44500 size: 418 +ret: 0 st: 0 flags:1 ts: 1.565841 +ret: 0 st: 0 flags:1 dts: 1.567347 pts: 1.567347 pos: 26528 size: 418 +ret: 0 st:-1 flags:0 ts: 0.460008 +ret: 0 st: 0 flags:1 dts: 0.470204 pts: 0.470204 pos: 8974 size: 418 +ret: 0 st:-1 flags:1 ts:-0.645825 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1451 size: 440 |