summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/avformat.h6
-rw-r--r--libavformat/mpegts.c2
-rw-r--r--libavformat/nutdec.c2
3 files changed, 7 insertions, 3 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index a6c40ad8b7..3715d848e4 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -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
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 997b7686be..89491498cf 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -686,7 +686,7 @@ static int mpegts_push_data(MpegTSFilter *filter,
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 --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index 5b4a923135..bdc216270c 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -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 */