[FFmpeg-cvslog] vaapi_h264: Fix CFR mode with frame_rate set in AVCodecContext

Mark Thompson git at videolan.org
Thu Mar 23 12:16:55 EET 2017


ffmpeg | branch: master | Mark Thompson <sw at jkqxz.net> | Sat Oct  1 10:48:44 2016 +0200| [17a0f9481cf07af0feb3838ca315b970117e8000] | committer: Mark Thompson

vaapi_h264: Fix CFR mode with frame_rate set in AVCodecContext

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=17a0f9481cf07af0feb3838ca315b970117e8000
---

 libavcodec/vaapi_encode_h264.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c
index 020f892..e90ed64 100644
--- a/libavcodec/vaapi_encode_h264.c
+++ b/libavcodec/vaapi_encode_h264.c
@@ -835,8 +835,8 @@ static int vaapi_encode_h264_init_sequence_params(AVCodecContext *avctx)
 
         vseq->vui_fields.bits.timing_info_present_flag = 1;
         if (avctx->framerate.num > 0 && avctx->framerate.den > 0) {
-            vseq->num_units_in_tick = avctx->framerate.num;
-            vseq->time_scale        = 2 * avctx->framerate.den;
+            vseq->num_units_in_tick = avctx->framerate.den;
+            vseq->time_scale        = 2 * avctx->framerate.num;
             mseq->fixed_frame_rate_flag = 1;
         } else {
             vseq->num_units_in_tick = avctx->time_base.num;



More information about the ffmpeg-cvslog mailing list