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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7076>
This commit is contained in:
Shengqi Yu 2024-07-01 10:00:42 +08:00 committed by GStreamer Marge Bot
parent 1159d7144a
commit 1875c178cd

View file

@ -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)