From 89a6ce105bec40546bba4fc9fd58717aacd53c29 Mon Sep 17 00:00:00 2001 From: Yinhang Liu Date: Mon, 6 Mar 2023 11:22:45 +0800 Subject: [PATCH] msdkenc: Fix scale ratio for frame duration For the calculation of frame duration, the numerator should be FrameRateExtD, and the denominator should be FrameRateExtN. Part-of: --- subprojects/gst-plugins-bad/sys/msdk/gstmsdkenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkenc.c b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkenc.c index 2627881aad..654d62b688 100644 --- a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkenc.c +++ b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkenc.c @@ -696,8 +696,8 @@ gst_msdkenc_init_encoder (GstMsdkEnc * thiz) thiz->frame_duration = gst_util_uint64_scale (GST_SECOND, - thiz->param.mfx.FrameInfo.FrameRateExtN, - thiz->param.mfx.FrameInfo.FrameRateExtD); + thiz->param.mfx.FrameInfo.FrameRateExtD, + thiz->param.mfx.FrameInfo.FrameRateExtN); switch (encoder_input_fmt) { case GST_VIDEO_FORMAT_P010_10LE: