[FFmpeg-cvslog] r25483 - in trunk/libavformat: avformat.h options.c

aurel subversion
Fri Oct 15 14:59:45 CEST 2010


Author: aurel
Date: Fri Oct 15 14:59:45 2010
New Revision: 25483

Log:
add FF_API_ALLOC_FORMAT_CONTEXT define to disable the deprecated
av_alloc_format_context() public function

Modified:
   trunk/libavformat/avformat.h
   trunk/libavformat/options.c

Modified: trunk/libavformat/avformat.h
==============================================================================
--- trunk/libavformat/avformat.h	Fri Oct 15 14:54:12 2010	(r25482)
+++ trunk/libavformat/avformat.h	Fri Oct 15 14:59:45 2010	(r25483)
@@ -63,6 +63,9 @@
 #ifndef FF_API_URL_SPLIT
 #define FF_API_URL_SPLIT          (LIBAVFORMAT_VERSION_MAJOR < 53)
 #endif
+#ifndef FF_API_ALLOC_FORMAT_CONTEXT
+#define FF_API_ALLOC_FORMAT_CONTEXT    (LIBAVFORMAT_VERSION_MAJOR < 53)
+#endif
 
 /**
  * I return the LIBAVFORMAT_VERSION_INT constant.  You got
@@ -1071,7 +1074,7 @@ int av_open_input_file(AVFormatContext *
                        int buf_size,
                        AVFormatParameters *ap);
 
-#if LIBAVFORMAT_VERSION_MAJOR < 53
+#if FF_API_ALLOC_FORMAT_CONTEXT
 /**
  * @deprecated Use avformat_alloc_context() instead.
  */

Modified: trunk/libavformat/options.c
==============================================================================
--- trunk/libavformat/options.c	Fri Oct 15 14:54:12 2010	(r25482)
+++ trunk/libavformat/options.c	Fri Oct 15 14:59:45 2010	(r25483)
@@ -89,7 +89,7 @@ AVFormatContext *avformat_alloc_context(
     return ic;
 }
 
-#if LIBAVFORMAT_VERSION_MAJOR < 53
+#if FF_API_ALLOC_FORMAT_CONTEXT
 AVFormatContext *av_alloc_format_context(void)
 {
     return avformat_alloc_context();



More information about the ffmpeg-cvslog mailing list