# HG changeset patch # User bcoudurier # Date 1245957027 0 # Node ID b2aa396484d42f570360727780cbe5b32396b259 # Parent 11e86c7bdc25fd31ee2d68f40f6f85870ff7b0ce use AVFormatContext->probesize in av_find_stream_info and raise default to 5M diff -r 11e86c7bdc25 -r b2aa396484d4 avformat.h --- a/avformat.h Thu Jun 25 19:01:16 2009 +0000 +++ b/avformat.h Thu Jun 25 19:10:27 2009 +0000 @@ -22,7 +22,7 @@ #define AVFORMAT_AVFORMAT_H #define LIBAVFORMAT_VERSION_MAJOR 52 -#define LIBAVFORMAT_VERSION_MINOR 35 +#define LIBAVFORMAT_VERSION_MINOR 36 #define LIBAVFORMAT_VERSION_MICRO 0 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ diff -r 11e86c7bdc25 -r b2aa396484d4 options.c --- a/options.c Thu Jun 25 19:01:16 2009 +0000 +++ b/options.c Thu Jun 25 19:10:27 2009 +0000 @@ -40,7 +40,7 @@ #define D AV_OPT_FLAG_DECODING_PARAM static const AVOption options[]={ -{"probesize", NULL, OFFSET(probesize), FF_OPT_TYPE_INT, 32000, 32, INT_MAX, D}, /* 32000 from mpegts.c: 1.0 second at 24Mbit/s */ +{"probesize", "set probing size", OFFSET(probesize), FF_OPT_TYPE_INT, 5000000, 32, INT_MAX, D}, {"muxrate", "set mux rate", OFFSET(mux_rate), FF_OPT_TYPE_INT, DEFAULT, 0, INT_MAX, E}, {"packetsize", "set packet size", OFFSET(packet_size), FF_OPT_TYPE_INT, DEFAULT, 0, INT_MAX, E}, {"fflags", NULL, OFFSET(flags), FF_OPT_TYPE_FLAGS, DEFAULT, INT_MIN, INT_MAX, D|E, "fflags"}, diff -r 11e86c7bdc25 -r b2aa396484d4 utils.c --- 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; }