aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-06-25 19:10:27 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-06-25 19:10:27 +0000
commit57011a13d6587160a43cc1737d2ee395059c7fc9 (patch)
tree36c35f5a226b3e0fe30f7d6a35766d1b3b4a99cb /libavformat/utils.c
parentd23612efe13a14d3ffe84198d643fa1ad2ded660 (diff)
downloadffmpeg-57011a13d6587160a43cc1737d2ee395059c7fc9.tar.gz
use AVFormatContext->probesize in av_find_stream_info and raise default to 5M
Originally committed as revision 19274 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 5806b2382e..9325e3dd3b 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1980,9 +1980,6 @@ static void compute_chapters_end(AVFormatContext *s)
}
}
-/* 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 @@ int av_find_stream_info(AVFormatContext *ic)
}
}
/* 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;
}