mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-28 05:50:43 +00:00
lavf: Set the stream time base hint properly for chained muxers
This avoids warnings about using the codec time base as time base hint. Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
b762494438
commit
28816050e4
@ -398,6 +398,7 @@ static int hds_write_header(AVFormatContext *s)
|
||||
}
|
||||
avcodec_copy_context(st->codec, s->streams[i]->codec);
|
||||
st->sample_aspect_ratio = s->streams[i]->sample_aspect_ratio;
|
||||
st->time_base = s->streams[i]->time_base;
|
||||
}
|
||||
if (c->streams[c->nb_streams].ctx)
|
||||
c->nb_streams++;
|
||||
|
@ -80,6 +80,7 @@ static int hls_mux_init(AVFormatContext *s)
|
||||
return AVERROR(ENOMEM);
|
||||
avcodec_copy_context(st->codec, s->streams[i]->codec);
|
||||
st->sample_aspect_ratio = s->streams[i]->sample_aspect_ratio;
|
||||
st->time_base = s->streams[i]->time_base;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -604,6 +604,7 @@ static int mpegts_write_header(AVFormatContext *s)
|
||||
ret = avcodec_copy_context(ast->codec, st->codec);
|
||||
if (ret != 0)
|
||||
goto fail;
|
||||
ast->time_base = st->time_base;
|
||||
ret = avformat_write_header(ts_st->amux, NULL);
|
||||
if (ret < 0)
|
||||
goto fail;
|
||||
|
@ -74,6 +74,7 @@ static int segment_mux_init(AVFormatContext *s)
|
||||
return AVERROR(ENOMEM);
|
||||
avcodec_copy_context(st->codec, s->streams[i]->codec);
|
||||
st->sample_aspect_ratio = s->streams[i]->sample_aspect_ratio;
|
||||
st->time_base = s->streams[i]->time_base;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -342,6 +342,7 @@ static int ism_write_header(AVFormatContext *s)
|
||||
}
|
||||
avcodec_copy_context(st->codec, s->streams[i]->codec);
|
||||
st->sample_aspect_ratio = s->streams[i]->sample_aspect_ratio;
|
||||
st->time_base = s->streams[i]->time_base;
|
||||
|
||||
ctx->pb = avio_alloc_context(os->iobuf, sizeof(os->iobuf), AVIO_FLAG_WRITE, os, NULL, ism_write, ism_seek);
|
||||
if (!ctx->pb) {
|
||||
|
Loading…
Reference in New Issue
Block a user