[FFmpeg-devel] [PATCH 5/6] fftools/ffplay: search for demuxer by extension as well
Gyan Doshi
ffmpeg at gyani.pro
Fri Jan 31 16:26:07 EET 2020
Identifies demuxer based on extension if short name search fails.
---
fftools/ffplay.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fftools/ffplay.c b/fftools/ffplay.c
index fee0619f7c..4b5f46949c 100644
--- a/fftools/ffplay.c
+++ b/fftools/ffplay.c
@@ -3477,8 +3477,8 @@ static int opt_height(void *optctx, const char *opt, const char *arg)
static int opt_format(void *optctx, const char *opt, const char *arg)
{
- file_iformat = av_find_input_format(arg);
- if (!file_iformat) {
+ if (!(file_iformat = av_find_input_format(arg)) &&
+ !(file_iformat = av_demuxer_find_by_ext(arg))) {
av_log(NULL, AV_LOG_FATAL, "Unknown input format: %s\n", arg);
return AVERROR(EINVAL);
}
--
2.24.1
More information about the ffmpeg-devel
mailing list