From e3ebebc20bceaaa25ebf240915a4d6bb49d3a71e Mon Sep 17 00:00:00 2001 From: Haihao Xiang Date: Tue, 21 Jan 2020 15:14:08 +0800 Subject: [PATCH] msdk: Fix compiler warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch fixed compiler warning below: [1/4] Compiling C object 'sys/msdk/dc44ea0@@gstmsdk@sha/gstmsdkvpp.c.o'. ../../gst-plugins-bad/sys/msdk/gstmsdkvpp.c: In function ‘gst_msdkvpp_context_prepare’: ../../gst-plugins-bad/sys/msdk/gstmsdkvpp.c:214:7: warning: suggest parentheses around operand of ‘!’ or change ‘&’ to ‘&&’ or ‘!’ to ‘~’ [-Wparentheses] --- sys/msdk/gstmsdkenc.c | 4 ++-- sys/msdk/gstmsdkvpp.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/msdk/gstmsdkenc.c b/sys/msdk/gstmsdkenc.c index 4a761d0886..7cb5610a7b 100644 --- a/sys/msdk/gstmsdkenc.c +++ b/sys/msdk/gstmsdkenc.c @@ -1620,8 +1620,8 @@ gst_msdkenc_context_prepare (GstMsdkEnc * thiz) * gst-launch-1.0 videotestsrc ! video/x-raw,format=I420 ! msdkh264enc ! \ * msdkh264dec ! msdkvpp ! video/x-raw,format=YUY2 ! fakesink */ - if (!gst_msdk_context_get_job_type (thiz->context) & (GST_MSDK_JOB_VPP | - GST_MSDK_JOB_ENCODER)) { + if (!(gst_msdk_context_get_job_type (thiz->context) & (GST_MSDK_JOB_VPP | + GST_MSDK_JOB_ENCODER))) { gst_msdk_context_add_job_type (thiz->context, GST_MSDK_JOB_ENCODER); return TRUE; } diff --git a/sys/msdk/gstmsdkvpp.c b/sys/msdk/gstmsdkvpp.c index dce4934dfa..3a11519418 100644 --- a/sys/msdk/gstmsdkvpp.c +++ b/sys/msdk/gstmsdkvpp.c @@ -211,8 +211,8 @@ gst_msdkvpp_context_prepare (GstMsdkVPP * thiz) * Example: * gst-launch-1.0 videotestsrc ! msdkvpp ! video/x-raw,format=YUY2 ! msdkh264enc ! fakesink */ - if (!gst_msdk_context_get_job_type (thiz->context) & (GST_MSDK_JOB_VPP | - GST_MSDK_JOB_ENCODER)) { + if (!(gst_msdk_context_get_job_type (thiz->context) & (GST_MSDK_JOB_VPP | + GST_MSDK_JOB_ENCODER))) { gst_msdk_context_add_job_type (thiz->context, GST_MSDK_JOB_VPP); return TRUE; }