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: n2.1~57^2~587 X-Git-Url: https://git.videolan.org/?p=ffmpeg.git;a=commitdiff_plain;h=9696740af715e50ef7098272e56e154826caa332 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 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);