diff options
author | Josh de Kock <josh@itanimul.li> | 2018-01-02 14:34:18 +0000 |
---|---|---|
committer | Josh de Kock <josh@itanimul.li> | 2018-02-06 18:57:42 +0000 |
commit | 0fd475704e871ef3a535947596a012894bae3cbd (patch) | |
tree | b4f94e4e1de998837296e48a7dba037e1a93d959 /libavformat/format.c | |
parent | 0694d8702421e7aff1340038559c438b61bb30dd (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.c | 8 |
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; } |