diff utils.c @ 5071:b2aa396484d4 libavformat

use AVFormatContext->probesize in av_find_stream_info and raise default to 5M
author bcoudurier
date Thu, 25 Jun 2009 19:10:27 +0000
parents 9fd4808c3916
children 8d5dd051d055
line wrap: on
line diff
--- a/utils.c	Thu Jun 25 19:01:16 2009 +0000
+++ b/utils.c	Thu Jun 25 19:10:27 2009 +0000
@@ -1980,9 +1980,6 @@
     }
 }
 
-/* absolute maximum size we read until we abort */
-#define MAX_READ_SIZE        5000000
-
 #define MAX_STD_TIMEBASES (60*12+5)
 static int get_std_framerate(int i){
     if(i<60*12) return i*1001;
@@ -2081,9 +2078,9 @@
             }
         }
         /* we did not get all the codec info, but we read too much data */
-        if (read_size >= MAX_READ_SIZE) {
+        if (read_size >= ic->probesize) {
             ret = count;
-            av_log(ic, AV_LOG_DEBUG, "MAX_READ_SIZE reached\n");
+            av_log(ic, AV_LOG_DEBUG, "MAX_READ_SIZE:%d reached\n", ic->probesize);
             break;
         }