hls: fix timebase
Fixes Ticket1733
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a12a618aa9)
This commit is contained in:
parent
7c8beec48c
commit
a8fc0bb608
1 changed files with 2 additions and 0 deletions
|
|
@ -560,12 +560,14 @@ static int hls_read_header(AVFormatContext *s)
|
|||
/* Create new AVStreams for each stream in this variant */
|
||||
for (j = 0; j < v->ctx->nb_streams; j++) {
|
||||
AVStream *st = avformat_new_stream(s, NULL);
|
||||
AVStream *ist = v->ctx->streams[j];
|
||||
if (!st) {
|
||||
ret = AVERROR(ENOMEM);
|
||||
goto fail;
|
||||
}
|
||||
ff_program_add_stream_index(s, i, stream_offset + j);
|
||||
st->id = i;
|
||||
avpriv_set_pts_info(st, ist->pts_wrap_bits, ist->time_base.num, ist->time_base.den);
|
||||
avcodec_copy_context(st->codec, v->ctx->streams[j]->codec);
|
||||
if (v->bandwidth)
|
||||
av_dict_set(&st->metadata, "variant_bitrate", bitrate_str,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue