summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-02-03 12:25:54 +0100
committerAnton Khirnov <anton@khirnov.net>2011-04-19 18:28:38 +0200
commit761ad429680637411882552921a9d5acb6aff59e (patch)
treeba03954b8cfd4196ff5d6016d292a0d203faaf87 /libavformat
parentaad2f2f477d6804f5f79ccce55b3d7f54b00f715 (diff)
lavf: remove FF_API_MAX_STREAMS cruft
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/avformat.h8
-rw-r--r--libavformat/mms.c4
-rw-r--r--libavformat/mpegts.c5
-rw-r--r--libavformat/nutdec.c4
-rw-r--r--libavformat/utils.c8
-rw-r--r--libavformat/version.h3
6 files changed, 0 insertions, 32 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 55808f13b8..6f7b6a5116 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -672,10 +672,6 @@ typedef struct AVChapter {
AVMetadata *metadata;
} AVChapter;
-#if FF_API_MAX_STREAMS
-#define MAX_STREAMS 20
-#endif
-
/**
* Format I/O context.
* New fields can be added to the end with minor version bumps.
@@ -691,11 +687,7 @@ typedef struct AVFormatContext {
void *priv_data;
AVIOContext *pb;
unsigned int nb_streams;
-#if FF_API_MAX_STREAMS
- AVStream *streams[MAX_STREAMS];
-#else
AVStream **streams;
-#endif
char filename[1024]; /**< input or output filename */
/* stream info */
int64_t timestamp;
diff --git a/libavformat/mms.c b/libavformat/mms.c
index 5796663253..192e7039af 100644
--- a/libavformat/mms.c
+++ b/libavformat/mms.c
@@ -24,11 +24,7 @@
#include "asf.h"
#include "libavutil/intreadwrite.h"
-#if FF_API_MAX_STREAMS
-#define MMS_MAX_STREAMS MAX_STREAMS
-#else
#define MMS_MAX_STREAMS 256 /**< arbitrary sanity check value */
-#endif
int ff_mms_read_header(MMSContext *mms, uint8_t *buf, const int size)
{
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 62e9dcbbd9..d7f2c0c957 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -675,11 +675,6 @@ static int mpegts_push_data(MpegTSFilter *filter,
code == 0x1be) /* padding_stream */
goto skip;
-#if FF_API_MAX_STREAMS
- if (!pes->st && pes->stream->nb_streams == MAX_STREAMS)
- goto skip;
-#endif
-
/* stream not present in PMT */
if (!pes->st) {
pes->st = av_new_stream(ts->stream, pes->pid);
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index d3804f2993..0a1ed554e3 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -30,11 +30,7 @@
#undef NDEBUG
#include <assert.h>
-#if FF_API_MAX_STREAMS
-#define NUT_MAX_STREAMS MAX_STREAMS
-#else
#define NUT_MAX_STREAMS 256 /* arbitrary sanity check value */
-#endif
static int get_str(AVIOContext *bc, char *string, unsigned int maxlen){
unsigned int len= ffio_read_varlen(bc);
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 6b38e66bc5..a1336179f1 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2660,13 +2660,6 @@ AVStream *av_new_stream(AVFormatContext *s, int id)
{
AVStream *st;
int i;
-
-#if FF_API_MAX_STREAMS
- if (s->nb_streams >= MAX_STREAMS){
- av_log(s, AV_LOG_ERROR, "Too many streams\n");
- return NULL;
- }
-#else
AVStream **streams;
if (s->nb_streams >= INT_MAX/sizeof(*streams))
@@ -2675,7 +2668,6 @@ AVStream *av_new_stream(AVFormatContext *s, int id)
if (!streams)
return NULL;
s->streams = streams;
-#endif
st = av_mallocz(sizeof(AVStream));
if (!st)
diff --git a/libavformat/version.h b/libavformat/version.h
index b21938aaef..bf1ae5bff8 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -41,9 +41,6 @@
* Those FF_API_* defines are not part of public API.
* They may change, break or disappear at any time.
*/
-#ifndef FF_API_MAX_STREAMS
-#define FF_API_MAX_STREAMS (LIBAVFORMAT_VERSION_MAJOR < 53)
-#endif
#ifndef FF_API_OLD_METADATA
#define FF_API_OLD_METADATA (LIBAVFORMAT_VERSION_MAJOR < 53)
#endif