diff options
author | Muhammad Faiz <mfcc64@gmail.com> | 2018-02-09 17:03:42 +0700 |
---|---|---|
committer | Muhammad Faiz <mfcc64@gmail.com> | 2018-02-10 07:23:41 +0700 |
commit | 909e00ae816df9b6a05b1c4d0cafb794d4d0ca28 (patch) | |
tree | 55072a056922db008107581caa56755838f19436 /libavformat/format.c | |
parent | 10bcc41bb40ba479bfc5ad29b1650a6b335437a8 (diff) | |
download | ffmpeg-909e00ae816df9b6a05b1c4d0cafb794d4d0ca28.tar.gz |
avformat/format: temporarily use old next api
Should fix https://ffmpeg.org/pipermail/ffmpeg-devel/2018-February/225066.html
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
Diffstat (limited to 'libavformat/format.c')
-rw-r--r-- | libavformat/format.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libavformat/format.c b/libavformat/format.c index b8c5a90a92..75951938cf 100644 --- a/libavformat/format.c +++ b/libavformat/format.c @@ -52,7 +52,9 @@ AVOutputFormat *av_guess_format(const char *short_name, const char *filename, const char *mime_type) { AVOutputFormat *fmt = NULL, *fmt_found; +#if !FF_API_NEXT void *i = 0; +#endif int score_max, score; /* specific test for image sequences */ @@ -66,7 +68,13 @@ AVOutputFormat *av_guess_format(const char *short_name, const char *filename, /* Find the proper file type. */ fmt_found = NULL; score_max = 0; - while ((fmt = av_muxer_iterate(&i))) { +#if FF_API_NEXT +FF_DISABLE_DEPRECATION_WARNINGS + while ((fmt = av_oformat_next(fmt))) +#else + while ((fmt = av_muxer_iterate(&i))) +#endif + { score = 0; if (fmt->name && short_name && av_match_name(short_name, fmt->name)) score += 100; @@ -81,6 +89,9 @@ AVOutputFormat *av_guess_format(const char *short_name, const char *filename, fmt_found = fmt; } } +#if FF_API_NEXT +FF_ENABLE_DEPRECATION_WARNINGS +#endif return fmt_found; } |