[SCM] libav/experimental: add FF_API_GUESS_FORMAT define to disable the deprecated guess_format() and guess_stream_format() public functions

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:17:41 UTC 2013


The following commit has been merged in the experimental branch:
commit 198ac67fe843f55535b75bd3f17b3a1b7ee847b6
Author: Aurelien Jacobs <aurel at gnuage.org>
Date:   Fri Oct 15 12:45:14 2010 +0000

    add FF_API_GUESS_FORMAT define to disable the deprecated guess_format()
    and guess_stream_format() public functions
    
    Originally committed as revision 25480 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index d01418c..89a4102 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -54,6 +54,9 @@
 #ifndef FF_API_REGISTER_PROTOCOL
 #define FF_API_REGISTER_PROTOCOL  (LIBAVFORMAT_VERSION_MAJOR < 53)
 #endif
+#ifndef FF_API_GUESS_FORMAT
+#define FF_API_GUESS_FORMAT       (LIBAVFORMAT_VERSION_MAJOR < 53)
+#endif
 
 /**
  * I return the LIBAVFORMAT_VERSION_INT constant.  You got
@@ -898,7 +901,7 @@ enum CodecID av_guess_image2_codec(const char *filename);
 /* utils.c */
 void av_register_input_format(AVInputFormat *format);
 void av_register_output_format(AVOutputFormat *format);
-#if LIBAVFORMAT_VERSION_MAJOR < 53
+#if FF_API_GUESS_FORMAT
 attribute_deprecated AVOutputFormat *guess_stream_format(const char *short_name,
                                     const char *filename,
                                     const char *mime_type);
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 8a08557..4060ca9 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -189,7 +189,7 @@ static int match_format(const char *name, const char *names)
     return !strcasecmp(name, names);
 }
 
-#if LIBAVFORMAT_VERSION_MAJOR < 53
+#if FF_API_GUESS_FORMAT
 AVOutputFormat *guess_format(const char *short_name, const char *filename,
                              const char *mime_type)
 {
@@ -234,7 +234,7 @@ AVOutputFormat *av_guess_format(const char *short_name, const char *filename,
     return fmt_found;
 }
 
-#if LIBAVFORMAT_VERSION_MAJOR < 53
+#if FF_API_GUESS_FORMAT
 AVOutputFormat *guess_stream_format(const char *short_name, const char *filename,
                              const char *mime_type)
 {

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list