From: Fuwei Tang Date: Thu, 5 Sep 2019 01:05:10 +0000 (+0800) Subject: msdkenc: work-around to avoid zero fps in MediaSDK structure X-Git-Tag: 1.19.3~507^2~2849 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9b2dc96b9909e73f64fd0cb1d4612e767e7bf6bd;p=platform%2Fupstream%2Fgstreamer.git msdkenc: work-around to avoid zero fps in MediaSDK structure --- diff --git a/sys/msdk/gstmsdkenc.c b/sys/msdk/gstmsdkenc.c index 08b462e..cf72d74 100644 --- a/sys/msdk/gstmsdkenc.c +++ b/sys/msdk/gstmsdkenc.c @@ -316,6 +316,11 @@ gst_msdkenc_init_encoder (GstMsdkEnc * thiz) g_assert_not_reached (); break; } + + /* work-around to avoid zero fps in msdk structure */ + if (0 == thiz->vpp_param.vpp.In.FrameRateExtN) + thiz->vpp_param.vpp.In.FrameRateExtN = 30; + thiz->vpp_param.vpp.Out = thiz->vpp_param.vpp.In; thiz->vpp_param.vpp.Out.FourCC = MFX_FOURCC_NV12; thiz->vpp_param.vpp.Out.ChromaFormat = MFX_CHROMAFORMAT_YUV420; @@ -415,6 +420,10 @@ gst_msdkenc_init_encoder (GstMsdkEnc * thiz) thiz->param.mfx.FrameInfo.BitDepthChroma = 8; } + /* work-around to avoid zero fps in msdk structure */ + if (0 == thiz->param.mfx.FrameInfo.FrameRateExtN) + thiz->param.mfx.FrameInfo.FrameRateExtN = 30; + /* ensure bitrate control parameters */ ensure_bitrate_control (thiz);