aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2016-11-29 22:13:58 +0000
committerMark Thompson <sw@jkqxz.net>2017-02-08 19:14:04 +0000
commit37de9ce713ebb65d8b040f4f83ba7542f0754485 (patch)
tree63729e911478b702e06d9565a481d6029984f18e
parentb9514756ba2b4f764fb86500a8172a57acb58403 (diff)
downloadffmpeg-37de9ce713ebb65d8b040f4f83ba7542f0754485.tar.gz
vaapi_h265: Fix CFR mode with framerate set in AVCodecContext
Same issue as 17a0f9481cf07af0feb3838ca315b970117e8000. (cherry picked from commit 7d81698b89172d2dcf1b78d4b42ba86262360559)
-rw-r--r--libavcodec/vaapi_encode_h265.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vaapi_encode_h265.c b/libavcodec/vaapi_encode_h265.c
index 35665e42d2..6ed1270dc9 100644
--- a/libavcodec/vaapi_encode_h265.c
+++ b/libavcodec/vaapi_encode_h265.c
@@ -825,8 +825,8 @@ static int vaapi_encode_h265_init_sequence_params(AVCodecContext *avctx)
vseq->bits_per_second = avctx->bit_rate;
if (avctx->framerate.num > 0 && avctx->framerate.den > 0) {
- vseq->vui_num_units_in_tick = avctx->framerate.num;
- vseq->vui_time_scale = avctx->framerate.den;
+ vseq->vui_num_units_in_tick = avctx->framerate.den;
+ vseq->vui_time_scale = avctx->framerate.num;
} else {
vseq->vui_num_units_in_tick = avctx->time_base.num;
vseq->vui_time_scale = avctx->time_base.den;