Fix invalid duration of ts files 64/221364/2
authorjiyong.min <jiyong.min@samsung.com>
Thu, 2 Jan 2020 00:08:07 +0000 (09:08 +0900)
committerjiyong.min <jiyong.min@samsung.com>
Thu, 2 Jan 2020 00:10:31 +0000 (09:10 +0900)
[patch from ffmpeg]
avformat/utils: estimate_timings_from_pts - increase retry counter, fixes invalid duration for ts files with hevc codec

    Fixes a mpegts file with hevc that fails estimating duration. Increasing number of
    retries fixes the issue.

Change-Id: I3356a8e0c444d7a64a3a7e04850fd38d5e3c45ea

libavformat/utils.c

index 40bbd9f..f241391 100644 (file)
@@ -1744,7 +1744,7 @@ static void estimate_timings_from_bit_rate(AVFormatContext *ic)
 }
 
 #define DURATION_MAX_READ_SIZE 250000
-#define DURATION_MAX_RETRY 3
+#define DURATION_MAX_RETRY 6
 
 /* only usable for MPEG-PS streams */
 static void estimate_timings_from_pts(AVFormatContext *ic, int64_t old_offset)