[FFmpeg-devel] [PATCH] libavformat/utils: hls live duration form bit rate is not accurate

zzj zzjjob at gmail.com
Mon Oct 10 10:05:41 EEST 2016


Signed-off-by: zzj <zzjjob at gmail.com>
---
 libavformat/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 5be1e86..c7d6a41 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2776,7 +2776,7 @@ static void estimate_timings(AVFormatContext *ic, int64_t old_offset)
          * the components */
         fill_all_stream_timings(ic);
         ic->duration_estimation_method = AVFMT_DURATION_FROM_STREAM;
-    } else {
+    } else if (strcmp(ic->iformat->name, "hls,applehttp")) {
         /* less precise: use bitrate info */
         estimate_timings_from_bit_rate(ic);
         ic->duration_estimation_method = AVFMT_DURATION_FROM_BITRATE;
-- 
2.7.4



More information about the ffmpeg-devel mailing list