diff mbox series

[FFmpeg-devel,04/11] tests/fate-run: Allow to set demuxer for generated file in transcode

Message ID AM7PR03MB66609C51474EE902BDE162188FCA9@AM7PR03MB6660.eurprd03.prod.outlook.com
State Superseded
Headers show
Series [FFmpeg-devel,01/11] tests/fate-run: Allow multiple inputs for transcode() | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc fail Make fate failed

Commit Message

Andreas Rheinhardt Aug. 29, 2021, 9:27 p.m. UTC
Up until now, the transcode() function allowed (and required) to specify
the input format as well as the format of the output format (i.e. the
muxer) of the generated file. But for reading the generated file
it relied on autodetection/probing. This does not always work, e.g.
not for aptx_hd, and so this commit adds an option to specify this.

(Notice that one can not just use the name of the muxer, because
the corresponding demuxer might have a different name (e.g. mp4-mov).)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 tests/fate-run.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index 4b21bab591..b486c780ab 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -233,6 +233,8 @@  transcode(){
     final_decode=$5
     ffprobe_opts=$7
     additional_inputs=$8
+    demuxer_opts=$9
+    test -z "$demuxer_opts" || demuxer_opts="-f $demuxer_opts"
     encfile="${outdir}/${test}.${enc_fmt}"
     test "$6" = -keep || cleanfiles="$cleanfiles $encfile"
     tsrcfile=$(target_path $srcfile)
@@ -241,10 +243,10 @@  transcode(){
            $ENC_OPTS $enc_opt $FLAGS -f $enc_fmt -y $tencfile || return
     do_md5sum $encfile
     echo $(wc -c $encfile)
-    ffmpeg $DEC_OPTS -i $tencfile $ENC_OPTS $FLAGS $final_decode \
+    ffmpeg $demuxer_opts $DEC_OPTS -i $tencfile $ENC_OPTS $FLAGS $final_decode \
         -f framecrc - || return
     test -z $ffprobe_opts || \
-        run ffprobe${PROGSUF}${EXECSUF} $ffprobe_opts $tencfile || return
+        run ffprobe${PROGSUF}${EXECSUF} $demuxer_opts $ffprobe_opts $tencfile || return
 }
 
 stream_remux(){