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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4119>
This commit is contained in:
Yinhang Liu 2023-03-06 11:22:45 +08:00
parent 76d1257cd3
commit 89a6ce105b

View file

@ -696,8 +696,8 @@ gst_msdkenc_init_encoder (GstMsdkEnc * thiz)
thiz->frame_duration = thiz->frame_duration =
gst_util_uint64_scale (GST_SECOND, 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) { switch (encoder_input_fmt) {
case GST_VIDEO_FORMAT_P010_10LE: case GST_VIDEO_FORMAT_P010_10LE: