From: Michael Niedermayer Date: Wed, 25 Jul 2012 15:40:33 +0000 (+0200) Subject: hls: Call avformat_find_stream_info() on the chained demuxers X-Git-Tag: v10_alpha1~1068 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9696740af715e50ef7098272e56e154826caa332;p=platform%2Fupstream%2Flibav.git 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ö --- 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);