summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorpkviet <pkv.stream@gmail.com>2017-08-22 11:30:45 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-08-25 23:41:11 +0200
commite0436ddaa49699fd3842ca36a9524bf31b55cfed (patch)
treeac7923c3e0b9b840e973b83b409f10c7d8e797d1 /tests
parent7c10068da10aa288195f5eb5d7e34eb2d8ff7447 (diff)
ffmpeg options: Enable trailing ? for map_channel
The -map option allows for a trailing ? so that an error is not thrown if the input stream does not exist. This capability is extended to the map_channel option. This allows a ffmpeg command not to break if an input channel does not exist, which can be of use (for instance, scripts processing audio channels with sources having unset number of audio channels). Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'tests')
-rw-r--r--tests/fate/ffmpeg.mak8
-rw-r--r--tests/ref/fate/mapchan-2ch-extract-ch0-ch2-trailing1
-rw-r--r--tests/ref/fate/mapchan-3ch-extract-ch0-ch2-trailing1
3 files changed, 10 insertions, 0 deletions
diff --git a/tests/fate/ffmpeg.mak b/tests/fate/ffmpeg.mak
index 0ec5a34921..f3fbc841b2 100644
--- a/tests/fate/ffmpeg.mak
+++ b/tests/fate/ffmpeg.mak
@@ -10,6 +10,14 @@ FATE_MAPCHAN-$(CONFIG_CHANNELMAP_FILTER) += fate-mapchan-silent-mono
fate-mapchan-silent-mono: tests/data/asynth-22050-1.wav
fate-mapchan-silent-mono: CMD = md5 -i $(TARGET_PATH)/tests/data/asynth-22050-1.wav -map_channel -1 -map_channel 0.0.0 -fflags +bitexact -f wav
+FATE_MAPCHAN-$(CONFIG_CHANNELMAP_FILTER) += fate-mapchan-2ch-extract-ch0-ch2-trailing
+fate-mapchan-2ch-extract-ch0-ch2-trailing: tests/data/asynth-44100-2.wav
+fate-mapchan-2ch-extract-ch0-ch2-trailing: CMD = md5 -i $(TARGET_PATH)/tests/data/asynth-44100-2.wav -map_channel 0.0.0 -map_channel 0.0.2? -fflags +bitexact -f wav
+
+FATE_MAPCHAN-$(CONFIG_CHANNELMAP_FILTER) += fate-mapchan-3ch-extract-ch0-ch2-trailing
+fate-mapchan-3ch-extract-ch0-ch2-trailing: tests/data/asynth-44100-3.wav
+fate-mapchan-3ch-extract-ch0-ch2-trailing: CMD = md5 -i $(TARGET_PATH)/tests/data/asynth-44100-3.wav -map_channel 0.0.0 -map_channel 0.0.2? -fflags +bitexact -f wav
+
FATE_MAPCHAN = $(FATE_MAPCHAN-yes)
FATE_FFMPEG += $(FATE_MAPCHAN)
diff --git a/tests/ref/fate/mapchan-2ch-extract-ch0-ch2-trailing b/tests/ref/fate/mapchan-2ch-extract-ch0-ch2-trailing
new file mode 100644
index 0000000000..a5400373cf
--- /dev/null
+++ b/tests/ref/fate/mapchan-2ch-extract-ch0-ch2-trailing
@@ -0,0 +1 @@
+b6e1d142b4e484221562e7b66b9bbbdc
diff --git a/tests/ref/fate/mapchan-3ch-extract-ch0-ch2-trailing b/tests/ref/fate/mapchan-3ch-extract-ch0-ch2-trailing
new file mode 100644
index 0000000000..6237a988be
--- /dev/null
+++ b/tests/ref/fate/mapchan-3ch-extract-ch0-ch2-trailing
@@ -0,0 +1 @@
+ae533985186cab287309c04f6b3e866c