From 506835a48484caa9d3fb2c077f51c7e69ef09860 Mon Sep 17 00:00:00 2001 From: "Xiang, Haihao" Date: Tue, 27 Nov 2018 15:52:56 +0800 Subject: [PATCH] msdkenc: use macro GST_VIDEO_INFO_FORMAT if possible --- sys/msdk/gstmsdkenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/msdk/gstmsdkenc.c b/sys/msdk/gstmsdkenc.c index f2b92f2..a992305 100644 --- a/sys/msdk/gstmsdkenc.c +++ b/sys/msdk/gstmsdkenc.c @@ -255,7 +255,7 @@ gst_msdkenc_init_encoder (GstMsdkEnc * thiz) if (thiz->use_video_memory) gst_msdk_set_frame_allocator (thiz->context); - if (info->finfo->format != GST_VIDEO_FORMAT_NV12) { + if (GST_VIDEO_INFO_FORMAT (info) != GST_VIDEO_FORMAT_NV12) { if (thiz->use_video_memory) thiz->vpp_param.IOPattern = MFX_IOPATTERN_IN_VIDEO_MEMORY | MFX_IOPATTERN_OUT_VIDEO_MEMORY; @@ -272,7 +272,7 @@ gst_msdkenc_init_encoder (GstMsdkEnc * thiz) thiz->vpp_param.vpp.In.AspectRatioW = info->par_n; thiz->vpp_param.vpp.In.AspectRatioH = info->par_d; thiz->vpp_param.vpp.In.PicStruct = MFX_PICSTRUCT_PROGRESSIVE; - switch (info->finfo->format) { + switch (GST_VIDEO_INFO_FORMAT (info)) { case GST_VIDEO_FORMAT_NV12: thiz->vpp_param.vpp.In.FourCC = MFX_FOURCC_NV12; thiz->vpp_param.vpp.In.ChromaFormat = MFX_CHROMAFORMAT_YUV420; -- 2.7.4