[FFmpeg-cvslog] r24817 - in trunk/libavformat: avformat.h mpegts.c nutdec.c

aurel subversion
Tue Aug 17 21:30:21 CEST 2010


Author: aurel
Date: Tue Aug 17 21:30:21 2010
New Revision: 24817

Log:
add LAVF_API_MAX_STREAMS define to disable the deprecated MAX_STREAMS API

Modified:
   trunk/libavformat/avformat.h
   trunk/libavformat/mpegts.c
   trunk/libavformat/nutdec.c

Modified: trunk/libavformat/avformat.h
==============================================================================
--- trunk/libavformat/avformat.h	Tue Aug 17 20:48:56 2010	(r24816)
+++ trunk/libavformat/avformat.h	Tue Aug 17 21:30:21 2010	(r24817)
@@ -35,6 +35,10 @@
 
 #define LIBAVFORMAT_IDENT       "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION)
 
+#ifndef LAVF_API_MAX_STREAMS
+#define LAVF_API_MAX_STREAMS  (LIBAVFORMAT_VERSION_MAJOR < 53)
+#endif
+
 /**
  * I return the LIBAVFORMAT_VERSION_INT constant.  You got
  * a fucking problem with that, douchebag?
@@ -630,7 +634,7 @@ typedef struct AVChapter {
     AVMetadata *metadata;
 } AVChapter;
 
-#if LIBAVFORMAT_VERSION_MAJOR < 53
+#if LAVF_API_MAX_STREAMS
 #define MAX_STREAMS 20
 #endif
 

Modified: trunk/libavformat/mpegts.c
==============================================================================
--- trunk/libavformat/mpegts.c	Tue Aug 17 20:48:56 2010	(r24816)
+++ trunk/libavformat/mpegts.c	Tue Aug 17 21:30:21 2010	(r24817)
@@ -686,7 +686,7 @@ static int mpegts_push_data(MpegTSFilter
                         code == 0x1be) /* padding_stream */
                         goto skip;
 
-#if LIBAVFORMAT_VERSION_MAJOR < 53
+#if LAVF_API_MAX_STREAMS
                     if (!pes->st && pes->stream->nb_streams == MAX_STREAMS)
                         goto skip;
 #endif

Modified: trunk/libavformat/nutdec.c
==============================================================================
--- trunk/libavformat/nutdec.c	Tue Aug 17 20:48:56 2010	(r24816)
+++ trunk/libavformat/nutdec.c	Tue Aug 17 21:30:21 2010	(r24817)
@@ -29,7 +29,7 @@
 #undef NDEBUG
 #include <assert.h>
 
-#if LIBAVFORMAT_VERSION_MAJOR < 53
+#if LAVF_API_MAX_STREAMS
 #define NUT_MAX_STREAMS MAX_STREAMS
 #else
 #define NUT_MAX_STREAMS 256    /* arbitrary sanity check value */



More information about the ffmpeg-cvslog mailing list