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@martin.st>
This commit is contained in:
Michael Niedermayer 2012-07-25 17:40:33 +02:00 committed by Martin Storsjö
parent 78b4bfdb84
commit 9696740af7

View File

@ -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);