diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 9a1a41e612d12cabf2c8f8f7adb2c9e9f56624a6..ff2a1e1ba04dc42480a5bab4f626e388bbef9b07 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -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 --git a/libavformat/options.c b/libavformat/options.c
index a921b91c62c1471f05f480ca51220bc00e62ebc4..795d02b73d0867f501bffd829309986a71fe7ea2 100644
--- a/libavformat/options.c
+++ b/libavformat/options.c
@@ -40,7 +40,7 @@ static const char* format_to_name(void* ptr)
 #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 --git a/libavformat/utils.c b/libavformat/utils.c
index 5806b2382eaaafc351494f369aef2e019f91ec16..9325e3dd3b024fb9bc745d852ba988b49183c9c1 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;
         }