Browse Source

lavc/vaapi_encode_mpeg2: fix frame rate calc error when use time_base.

fix frame rate calc error when use time_base.

Signed-off-by: Yun Zhou <yunx.z.zhou@intel.com>
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
tags/n3.4
Jun Zhao Mark Thompson 8 years ago
parent
commit
a918f16f7c
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/vaapi_encode_mpeg2.c

+ 1
- 1
libavcodec/vaapi_encode_mpeg2.c View File

@@ -208,7 +208,7 @@ static int vaapi_encode_mpeg2_init_sequence_params(AVCodecContext *avctx)
if (avctx->framerate.num > 0 && avctx->framerate.den > 0)
vseq->frame_rate = (float)avctx->framerate.num / avctx->framerate.den;
else
vseq->frame_rate = (float)avctx->time_base.num / avctx->time_base.den;
vseq->frame_rate = (float)avctx->time_base.den / avctx->time_base.num;

vseq->aspect_ratio_information = 1;
vseq->vbv_buffer_size = avctx->rc_buffer_size / (16 * 1024);


Loading…
Cancel
Save