# HG changeset patch # User aurel # Date 1282073421 0 # Node ID 65745776af688c10f9b9e6a1a9246945226802cc # Parent a4e249f79b66a4053a815fb7f925350928138313 add LAVF_API_MAX_STREAMS define to disable the deprecated MAX_STREAMS API diff -r a4e249f79b66 -r 65745776af68 avformat.h --- a/avformat.h Tue Aug 17 14:25:14 2010 +0000 +++ b/avformat.h Tue Aug 17 19:30:21 2010 +0000 @@ -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 @@ AVMetadata *metadata; } AVChapter; -#if LIBAVFORMAT_VERSION_MAJOR < 53 +#if LAVF_API_MAX_STREAMS #define MAX_STREAMS 20 #endif diff -r a4e249f79b66 -r 65745776af68 mpegts.c --- a/mpegts.c Tue Aug 17 14:25:14 2010 +0000 +++ b/mpegts.c Tue Aug 17 19:30:21 2010 +0000 @@ -686,7 +686,7 @@ 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 diff -r a4e249f79b66 -r 65745776af68 nutdec.c --- a/nutdec.c Tue Aug 17 14:25:14 2010 +0000 +++ b/nutdec.c Tue Aug 17 19:30:21 2010 +0000 @@ -29,7 +29,7 @@ #undef NDEBUG #include -#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 */