[FFmpeg-devel] [PATCH 2/2] lavf: add test for the attachment demuxer.

Nicolas George george at nsup.org
Thu Apr 17 14:47:22 CEST 2014


Signed-off-by: Nicolas George <george at nsup.org>
---
 tests/fate-run.sh               |    4 ++++
 tests/fate/demux.mak            |    8 ++++++++
 tests/ref/fate/attachment-demux |    7 +++++++
 3 files changed, 19 insertions(+)
 create mode 100644 tests/ref/fate/attachment-demux


Just using any random file laying about in the test tree.


diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index 35d79a6..138a7a9 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -97,6 +97,10 @@ framemd5(){
     ffmpeg "$@" -flags +bitexact -f framemd5 -
 }
 
+infodump(){
+    ffmpeg "$@" -flags +bitexact -f infodump -
+}
+
 crc(){
     ffmpeg "$@" -f crc -
 }
diff --git a/tests/fate/demux.mak b/tests/fate/demux.mak
index c9ff7a2..d060ad7 100644
--- a/tests/fate/demux.mak
+++ b/tests/fate/demux.mak
@@ -112,3 +112,11 @@ fate-xwma-demux: CMD = crc -i $(TARGET_SAMPLES)/xwma/ergon.xwma -acodec copy
 FATE_SAMPLES_DEMUX += $(FATE_SAMPLES_DEMUX-yes)
 FATE_SAMPLES_FFMPEG += $(FATE_SAMPLES_DEMUX)
 fate-demux: $(FATE_SAMPLES_DEMUX)
+
+FATE_DEMUX-$(CONFIG_ATTACHMENT_DEMUXER) += fate-attachment-demux
+fate-attachment-demux: CMD = infodump -f attachment -file_codec ttf -i tests/data/asynth-8000-1.wav -map 0
+fate-attachment-demux: tests/data/asynth-8000-1.wav
+
+FATE_DEMUX += $(FATE_DEMUX-yes)
+FATE_FFMPEG += $(FATE_DEMUX)
+fate-demux: $(FATE_SAMPLES_DEMUX)
diff --git a/tests/ref/fate/attachment-demux b/tests/ref/fate/attachment-demux
new file mode 100644
index 0000000..92007ba
--- /dev/null
+++ b/tests/ref/fate/attachment-demux
@@ -0,0 +1,7 @@
+ffmpeg infodump version 1.0
+stream id:0 tb:1/90000 sar:0/1 afps:0/0 rfps:0/0
+  codec type:attachment id:18000 (ttf)
+  extradata:96046 (adler32:7f173fb5)
+  metadata:
+    filename=asynth-8000-1.wav
+    mimetype=application/x-truetype-font
-- 
1.7.10.4



More information about the ffmpeg-devel mailing list