From 9825cd8951c3343969312a4f89bb56bc666ab4ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Tue, 13 Jun 2023 11:53:57 +0200 Subject: [PATCH] vapostproc: evaluate op_flags validations as boolean Part-of: --- subprojects/gst-plugins-bad/sys/va/gstvavpp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/va/gstvavpp.c b/subprojects/gst-plugins-bad/sys/va/gstvavpp.c index c5dc7121ca..0b960cfd74 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvavpp.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvavpp.c @@ -813,7 +813,7 @@ gst_va_vpp_before_transform (GstBaseTransform * trans, GstBuffer * inbuf) self->op_flags &= ~VPP_CONVERT_CROP; } gst_va_filter_enable_cropping (btrans->filter, - (self->op_flags & VPP_CONVERT_CROP)); + (self->op_flags & VPP_CONVERT_CROP) == VPP_CONVERT_CROP); GST_OBJECT_UNLOCK (self); } @@ -879,13 +879,13 @@ gst_va_vpp_transform_meta (GstBaseTransform * trans, GstBuffer * inbuf, return TRUE; /* don't copy colorspace/size/orientation specific metadata */ - if ((self->op_flags & VPP_CONVERT_FORMAT) + if ((self->op_flags & VPP_CONVERT_FORMAT) == VPP_CONVERT_FORMAT && gst_meta_api_type_has_tag (info->api, META_TAG_COLORSPACE)) return FALSE; - else if ((self->op_flags & (VPP_CONVERT_SIZE | VPP_CONVERT_CROP)) + else if ((self->op_flags & (VPP_CONVERT_SIZE | VPP_CONVERT_CROP)) != 0 && gst_meta_api_type_has_tag (info->api, META_TAG_SIZE)) return FALSE; - else if ((self->op_flags & VPP_CONVERT_DIRECTION) + else if ((self->op_flags & VPP_CONVERT_DIRECTION) == VPP_CONVERT_DIRECTION && gst_meta_api_type_has_tag (info->api, META_TAG_ORIENTATION)) return FALSE; else if (gst_meta_api_type_has_tag (info->api, META_TAG_VIDEO))