diff --git a/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2format.c b/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2format.c index 2833c2e5a8..f8d01fcb5f 100644 --- a/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2format.c +++ b/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2format.c @@ -89,10 +89,9 @@ set_stride (GstVideoInfo * info, gint plane, gint stride) padded_height = GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT (finfo, plane, info->height); - padded_height = (padded_height + tile_height - 1) / tile_height; x_tiles = stride / GST_VIDEO_FORMAT_INFO_TILE_STRIDE (finfo, plane); - y_tiles = padded_height / tile_height; + y_tiles = (padded_height + tile_height - 1) / tile_height; info->stride[plane] = GST_VIDEO_TILE_MAKE_STRIDE (x_tiles, y_tiles); } else { info->stride[plane] = stride;