[FFmpeg-cvslog] r25489 - in trunk/libavformat: avformat.h utils.c

aurel subversion
Fri Oct 15 16:25:36 CEST 2010


Author: aurel
Date: Fri Oct 15 16:25:36 2010
New Revision: 25489

Log:
add FF_API_FIRST_FORMAT define to drop deprecated first_?format from public api

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

Modified: trunk/libavformat/avformat.h
==============================================================================
--- trunk/libavformat/avformat.h	Fri Oct 15 16:19:01 2010	(r25488)
+++ trunk/libavformat/avformat.h	Fri Oct 15 16:25:36 2010	(r25489)
@@ -78,6 +78,9 @@
 #ifndef FF_API_PARAMETERS_CODEC_ID
 #define FF_API_PARAMETERS_CODEC_ID     (LIBAVFORMAT_VERSION_MAJOR < 53)
 #endif
+#ifndef FF_API_FIRST_FORMAT
+#define FF_API_FIRST_FORMAT            (LIBAVFORMAT_VERSION_MAJOR < 53)
+#endif
 
 /**
  * I return the LIBAVFORMAT_VERSION_INT constant.  You got
@@ -895,7 +898,7 @@ typedef struct AVPacketList {
     struct AVPacketList *next;
 } AVPacketList;
 
-#if LIBAVFORMAT_VERSION_INT < (53<<16)
+#if FF_API_FIRST_FORMAT
 attribute_deprecated extern AVInputFormat *first_iformat;
 attribute_deprecated extern AVOutputFormat *first_oformat;
 #endif

Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c	Fri Oct 15 16:19:01 2010	(r25488)
+++ trunk/libavformat/utils.c	Fri Oct 15 16:25:36 2010	(r25489)
@@ -110,8 +110,14 @@ static void av_frac_add(AVFrac *f, int64
 }
 
 /** head of registered input format linked list */
+#if !FF_API_FIRST_FORMAT
+static
+#endif
 AVInputFormat *first_iformat = NULL;
 /** head of registered output format linked list */
+#if !FF_API_FIRST_FORMAT
+static
+#endif
 AVOutputFormat *first_oformat = NULL;
 
 AVInputFormat  *av_iformat_next(AVInputFormat  *f)



More information about the ffmpeg-cvslog mailing list