From c4fe9786ea8120bff4d9499d486492cee374fb98 Mon Sep 17 00:00:00 2001 From: Shengqi Yu Date: Mon, 1 Jul 2024 10:00:42 +0800 Subject: [PATCH] v4l2object: use v4l2 reported width for padded_width when complex video formats Stride means bytes per line, and padded_width means pixels. Here, padded_width shoule be pix width reported by v4l2 instead of stride. Part-of: --- subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c index f0e350bc7f..acceb5335d 100644 --- a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c +++ b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c @@ -3540,7 +3540,7 @@ gst_v4l2_object_save_format (GstV4l2Object * v4l2object, GST_WARNING_OBJECT (v4l2object->dbg_obj, "format %s has a pstride of 0, cannot compute padded with", gst_video_format_to_string (GST_VIDEO_INFO_FORMAT (info))); - padded_width = stride; + padded_width = format->fmt.pix.width; } if (padded_width < format->fmt.pix.width)