msdk: dec: set framerate to the driver only if provided For example, if framerate 0/1 is provided from upstream, the driver fails to configure and complain about it. We can let it go and make the driver assuming framerate itself. https://bugzilla.gnome.org/show_bug.cgi?id=789752
diff --git a/sys/msdk/gstmsdkdec.c b/sys/msdk/gstmsdkdec.c index 3dbb03e..62c59a6 100644 --- a/sys/msdk/gstmsdkdec.c +++ b/sys/msdk/gstmsdkdec.c
@@ -256,8 +256,13 @@ thiz->param.mfx.FrameInfo.Height = GST_ROUND_UP_32 (info->height); thiz->param.mfx.FrameInfo.CropW = info->width; thiz->param.mfx.FrameInfo.CropH = info->height; - thiz->param.mfx.FrameInfo.FrameRateExtN = info->fps_n; - thiz->param.mfx.FrameInfo.FrameRateExtD = info->fps_d; + + /* Set framerate only if provided. + * If not, framerate will be assumed inside the driver */ + if (info->fps_n > 0 && info->fps_d > 0) { + thiz->param.mfx.FrameInfo.FrameRateExtN = info->fps_n; + thiz->param.mfx.FrameInfo.FrameRateExtD = info->fps_d; + } thiz->param.mfx.FrameInfo.AspectRatioW = info->par_n; thiz->param.mfx.FrameInfo.AspectRatioH = info->par_d; thiz->param.mfx.FrameInfo.PicStruct = MFX_PICSTRUCT_PROGRESSIVE;