Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun Zhao <jun.zhao@intel.com>2017-09-06 06:07:15 +0300
committerMark Thompson <sw@jkqxz.net>2017-09-09 13:31:46 +0300
commita918f16f7ccc7eb75330c97036888cf05c14b311 (patch)
treeb4af02c8c15275c87af1d219fa2a92a3a0f99aca /libavcodec/vaapi_encode_mpeg2.c
parent7a6bd541528b4d00b52d422d02f01d42346e68df (diff)
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>
Diffstat (limited to 'libavcodec/vaapi_encode_mpeg2.c')
-rw-r--r--libavcodec/vaapi_encode_mpeg2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vaapi_encode_mpeg2.c b/libavcodec/vaapi_encode_mpeg2.c
index fbddfa5d5a..dc918884e8 100644
--- a/libavcodec/vaapi_encode_mpeg2.c
+++ b/libavcodec/vaapi_encode_mpeg2.c
@@ -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);