From 20eb14b85bd96d1dc55983d76dc2ddc33699efe7 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Mon, 29 Jul 2024 11:40:01 -0400 Subject: [PATCH] v4l2object: Fix size of plane_size array calculation Due to missing parenthesys, only the first element of the array was being cleared. As it is a staticly sized array in the object, this code could also be simplified. Part-of: --- subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c index bf6e366e13..19d8e08ab7 100644 --- a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c +++ b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c @@ -3600,8 +3600,7 @@ gst_v4l2_object_save_format (GstV4l2Object * v4l2object, if ((align->padding_left + align->padding_top) > 0) GST_WARNING_OBJECT (v4l2object->dbg_obj, "Left and top padding is not permitted for tiled formats"); - memset (v4l2object->plane_size, 0, - sizeof (v4l2object->plane_size[0] * GST_VIDEO_MAX_PLANES)); + memset (v4l2object->plane_size, 0, sizeof (v4l2object->plane_size)); } else { if (!gst_video_info_align_full (info, align, v4l2object->plane_size)) { GST_WARNING_OBJECT (v4l2object->dbg_obj, "Failed to align video info");