[FFmpeg-cvslog] hls: Call avformat_find_stream_info() on the chained demuxers

Michael Niedermayer git at videolan.org
Wed Jul 31 11:12:07 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Jul 25 17:40:33 2012 +0200| [9696740af715e50ef7098272e56e154826caa332] | committer: Martin Storsjö

hls: Call avformat_find_stream_info() on the chained demuxers

This allows the chained demuxer (or more precisely, the lavf
utility code) to better fill in timestamps on packets from
these, especially for cases where one stream is a raw ADTS
stream.

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9696740af715e50ef7098272e56e154826caa332
---

 libavformat/hls.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavformat/hls.c b/libavformat/hls.c
index 9aef5e0..ea16f8a 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -529,6 +529,11 @@ static int hls_read_header(AVFormatContext *s)
         ret = avformat_open_input(&v->ctx, v->segments[0]->url, in_fmt, NULL);
         if (ret < 0)
             goto fail;
+
+        v->ctx->ctx_flags &= ~AVFMTCTX_NOHEADER;
+        ret = avformat_find_stream_info(v->ctx, NULL);
+        if (ret < 0)
+            goto fail;
         snprintf(bitrate_str, sizeof(bitrate_str), "%d", v->bandwidth);
 
         program = av_new_program(s, i);



More information about the ffmpeg-cvslog mailing list