On 29-01-2020 03:10 pm, Anton Khirnov wrote:
Quoting Gyan Doshi (2020-01-28 08:44:42)
Identifies demuxer by extension if search by short name fails.
---
libavformat/avformat.h | 7 +++++++
libavformat/format.c | 14 +++++++++++++-
libavformat/version.h | 2 +-
3 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 9b9b634ec3..c81c4f18fd 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -2246,6 +2246,13 @@ ff_const59 AVInputFormat *av_find_input_format(const
char *short_name);
*/
ff_const59 AVInputFormat *av_probe_input_format(ff_const59 AVProbeData *pd,
int is_opened);
+/**
+ * Find AVInputFormat based on the short name of the input format.
+ * If that fails and as_extension is set, find demuxer which has registered the
+ * name as an extension.
+ */
+ff_const59 AVInputFormat *av_find_input_format2(const char *short_name, int
as_extension);
This seems rather ad-hoc to me. I think it'd be cleaner to have a
dedicated function just for matching by extension. It could be called
av_demuxer_find_by_ext() for consistency with av_demuxer_iterate().
Sure. But it could be both. av_find_input_format2 could call
av_find_format_by_ext() if name fails.
Gyan
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".