]> git.sesse.net Git - ffmpeg/commitdiff
vaapi_h265: Fix CFR mode with framerate set in AVCodecContext
authorMark Thompson <sw@jkqxz.net>
Tue, 29 Nov 2016 22:13:58 +0000 (22:13 +0000)
committerMark Thompson <sw@jkqxz.net>
Sat, 10 Dec 2016 16:55:44 +0000 (16:55 +0000)
Same issue as 17a0f9481cf07af0feb3838ca315b970117e8000.

libavcodec/vaapi_encode_h265.c

index ecf7973368b629e9a85802f44d7a5d77f1f88982..ade7d4a933a277bbece5c9e6c3e32e6fce9bee51 100644 (file)
@@ -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;