[FFmpeg-devel] [PATCH 2/4] Revert "avformat/format: temporarily use old next api"
Josh de Kock
josh at itanimul.li
Sun Apr 1 02:24:26 EEST 2018
This reverts commit 909e00ae816df9b6a05b1c4d0cafb794d4d0ca28.
There is no need to use the old API anymore as the new API now
behaves in the same way (treating devices as formats when loaded).
Signed-off-by: Josh de Kock <josh at itanimul.li>
---
libavformat/format.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/libavformat/format.c b/libavformat/format.c
index 123f5faf6c..608af1b692 100644
--- a/libavformat/format.c
+++ b/libavformat/format.c
@@ -52,9 +52,7 @@ 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 */
@@ -68,13 +66,7 @@ AVOutputFormat *av_guess_format(const char *short_name, const char *filename,
/* Find the proper file type. */
fmt_found = NULL;
score_max = 0;
-#if FF_API_NEXT
-FF_DISABLE_DEPRECATION_WARNINGS
- while ((fmt = av_oformat_next(fmt)))
-#else
- while ((fmt = av_muxer_iterate(&i)))
-#endif
- {
+ while ((fmt = av_muxer_iterate(&i))) {
score = 0;
if (fmt->name && short_name && av_match_name(short_name, fmt->name))
score += 100;
@@ -89,9 +81,6 @@ FF_DISABLE_DEPRECATION_WARNINGS
fmt_found = fmt;
}
}
-#if FF_API_NEXT
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
return fmt_found;
}
--
2.14.3 (Apple Git-98)
More information about the ffmpeg-devel
mailing list