[FFmpeg-devel] [PATCH 4/6] fftools/ffprobe: search for demuxer by extension as well

Gyan Doshi ffmpeg at gyani.pro
Fri Jan 31 16:26:06 EET 2020


Identifies demuxer based on extension if short name search fails.
---
 fftools/ffprobe.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
index b619c1f34e..a2886ec976 100644
--- a/fftools/ffprobe.c
+++ b/fftools/ffprobe.c
@@ -3166,8 +3166,8 @@ static void ffprobe_show_pixel_formats(WriterContext *w)
 
 static int opt_format(void *optctx, const char *opt, const char *arg)
 {
-    iformat = av_find_input_format(arg);
-    if (!iformat) {
+    if (!(iformat = av_find_input_format(arg)) &&
+        !(iformat = av_demuxer_find_by_ext(arg))) {
         av_log(NULL, AV_LOG_ERROR, "Unknown input format: %s\n", arg);
         return AVERROR(EINVAL);
     }
-- 
2.24.1



More information about the ffmpeg-devel mailing list