Commit a918f16f authored by Jun Zhao's avatar Jun Zhao Committed by Mark Thompson

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: 's avatarYun Zhou <yunx.z.zhou@intel.com>
Signed-off-by: 's avatarJun Zhao <jun.zhao@intel.com>
Signed-off-by: 's avatarMark Thompson <sw@jkqxz.net>
parent 7a6bd541
...@@ -208,7 +208,7 @@ static int vaapi_encode_mpeg2_init_sequence_params(AVCodecContext *avctx) ...@@ -208,7 +208,7 @@ static int vaapi_encode_mpeg2_init_sequence_params(AVCodecContext *avctx)
if (avctx->framerate.num > 0 && avctx->framerate.den > 0) if (avctx->framerate.num > 0 && avctx->framerate.den > 0)
vseq->frame_rate = (float)avctx->framerate.num / avctx->framerate.den; vseq->frame_rate = (float)avctx->framerate.num / avctx->framerate.den;
else 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->aspect_ratio_information = 1;
vseq->vbv_buffer_size = avctx->rc_buffer_size / (16 * 1024); vseq->vbv_buffer_size = avctx->rc_buffer_size / (16 * 1024);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment