mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
avcodec/h264: fix time_base and framerate
They are not just inverses of each other. This should restore behavior to before the introduction of framerate Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
620e7f0f3b
commit
09450c5509
3 changed files with 6 additions and 4 deletions
|
|
@ -490,6 +490,8 @@ static int h264_parse(AVCodecParserContext *s,
|
|||
|
||||
parse_nal_units(s, avctx, buf, buf_size);
|
||||
|
||||
if (avctx->framerate.num)
|
||||
avctx->time_base = av_inv_q(av_mul_q(avctx->framerate, (AVRational){avctx->ticks_per_frame, 1}));
|
||||
if (h->sei_cpb_removal_delay >= 0) {
|
||||
s->dts_sync_point = h->sei_buffering_period_present;
|
||||
s->dts_ref_dts_delta = h->sei_cpb_removal_delay;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue