mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 19:30:05 +00:00
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:
parent
78b4bfdb84
commit
9696740af7
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user