changeset 6360:4f920c9dd895 libavformat

get rid of MAX_STREAMS limit in nutdec
author aurel
date Tue, 10 Aug 2010 16:36:36 +0000
parents f8fe5baa8b47
children 34df2b405550
files nutdec.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/nutdec.c	Tue Aug 10 08:37:19 2010 +0000
+++ b/nutdec.c	Tue Aug 10 16:36:36 2010 +0000
@@ -29,6 +29,12 @@
 #undef NDEBUG
 #include <assert.h>
 
+#if LIBAVFORMAT_VERSION_MAJOR < 53
+#define NUT_MAX_STREAMS MAX_STREAMS
+#else
+#define NUT_MAX_STREAMS 256    /* arbitrary sanity check value */
+#endif
+
 static int get_str(ByteIOContext *bc, char *string, unsigned int maxlen){
     unsigned int len= ff_get_v(bc);
 
@@ -193,7 +199,7 @@
     end += url_ftell(bc);
 
     GET_V(tmp              , tmp >=2 && tmp <= 3)
-    GET_V(stream_count     , tmp > 0 && tmp <=MAX_STREAMS)
+    GET_V(stream_count     , tmp > 0 && tmp <= NUT_MAX_STREAMS)
 
     nut->max_distance = ff_get_v(bc);
     if(nut->max_distance > 65536){