summaryrefslogtreecommitdiff
path: root/libavformat/format.c
diff options
context:
space:
mode:
authorJosh de Kock <josh@itanimul.li>2018-01-02 14:34:18 +0000
committerJosh de Kock <josh@itanimul.li>2018-02-06 18:57:42 +0000
commit0fd475704e871ef3a535947596a012894bae3cbd (patch)
treeb4f94e4e1de998837296e48a7dba037e1a93d959 /libavformat/format.c
parent0694d8702421e7aff1340038559c438b61bb30dd (diff)
lavd: add new API for iterating input and output devices
This also adds an avpriv function to register devices in libavformat
Diffstat (limited to 'libavformat/format.c')
-rw-r--r--libavformat/format.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/format.c b/libavformat/format.c
index 608af1b692..b8c5a90a92 100644
--- a/libavformat/format.c
+++ b/libavformat/format.c
@@ -118,10 +118,18 @@ enum AVCodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,
AVInputFormat *av_find_input_format(const char *short_name)
{
AVInputFormat *fmt = NULL;
+#if FF_API_NEXT
+FF_DISABLE_DEPRECATION_WARNINGS
+ while ((fmt = av_iformat_next(fmt)))
+ if (av_match_name(short_name, fmt->name))
+ return fmt;
+FF_ENABLE_DEPRECATION_WARNINGS
+#else
void *i = 0;
while ((fmt = av_demuxer_iterate(&i)))
if (av_match_name(short_name, fmt->name))
return fmt;
+#endif
return NULL;
}