avformat/utils: scan a bit farther for a keyframe in mpeg/mpegts (7 sec instead of...
authorMichael Niedermayer <michael@niedermayer.cc>
Sat, 19 Mar 2016 20:11:58 +0000 (21:11 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 21 Mar 2016 19:46:29 +0000 (20:46 +0100)
Fixes Ticket5305

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/utils.c

index 5409907..67d4d1b 100644 (file)
@@ -3208,6 +3208,8 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
         max_subtitle_analyze_duration = 30*AV_TIME_BASE;
         if (!strcmp(ic->iformat->name, "flv"))
             max_stream_analyze_duration = 90*AV_TIME_BASE;
+        if (!strcmp(ic->iformat->name, "mpeg") || !strcmp(ic->iformat->name, "mpegts"))
+            max_stream_analyze_duration = 7*AV_TIME_BASE;
     }
 
     if (ic->pb)