mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-09 14:14:39 +02:00
vaapi_h264: Fix CFR mode with frame_rate set in AVCodecContext
(cherry picked from commit 17a0f9481cf07af0feb3838ca315b970117e8000)
This commit is contained in:
parent
ded1859df1
commit
658c5afaa0
@ -835,8 +835,8 @@ static int vaapi_encode_h264_init_sequence_params(AVCodecContext *avctx)
|
|||||||
|
|
||||||
vseq->vui_fields.bits.timing_info_present_flag = 1;
|
vseq->vui_fields.bits.timing_info_present_flag = 1;
|
||||||
if (avctx->framerate.num > 0 && avctx->framerate.den > 0) {
|
if (avctx->framerate.num > 0 && avctx->framerate.den > 0) {
|
||||||
vseq->num_units_in_tick = avctx->framerate.num;
|
vseq->num_units_in_tick = avctx->framerate.den;
|
||||||
vseq->time_scale = 2 * avctx->framerate.den;
|
vseq->time_scale = 2 * avctx->framerate.num;
|
||||||
mseq->fixed_frame_rate_flag = 1;
|
mseq->fixed_frame_rate_flag = 1;
|
||||||
} else {
|
} else {
|
||||||
vseq->num_units_in_tick = avctx->time_base.num;
|
vseq->num_units_in_tick = avctx->time_base.num;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user