From e4ee4ca716b4a4d9054644290929b7ee5d4dcca3 Mon Sep 17 00:00:00 2001 From: Elliot Chen Date: Fri, 29 Mar 2024 11:14:54 +0900 Subject: [PATCH] v4l2: fix error in calculating padding bottom for tile format This is a regression while porting to arbitrary tile dimensions introduced in !3424. Part-of: --- subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c index 4a0821f01d..d6104dbea2 100644 --- a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c +++ b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c @@ -3551,7 +3551,9 @@ gst_v4l2_object_save_format (GstV4l2Object * v4l2object, if (GST_VIDEO_FORMAT_INFO_IS_TILED (finfo)) { guint tile_height; tile_height = GST_VIDEO_FORMAT_INFO_TILE_HEIGHT (finfo, 0); - padded_height = (padded_height + tile_height - 1) / tile_height; + /* Round-up to tile_height as drivers are not forced to do so */ + padded_height = + (padded_height + tile_height - 1) / tile_height * tile_height; } align->padding_bottom =