From 9696740af715e50ef7098272e56e154826caa332 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 25 Jul 2012 17:40:33 +0200 Subject: hls: Call avformat_find_stream_info() on the chained demuxers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ö --- libavformat/hls.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libavformat/hls.c') diff --git a/libavformat/hls.c b/libavformat/hls.c index 9aef5e07f3..ea16f8abf3 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -527,6 +527,11 @@ static int hls_read_header(AVFormatContext *s) v->ctx->pb = &v->pb; v->stream_offset = stream_offset; 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); -- cgit v1.2.3