kmsallocator: fix stride with planar formats
authorHugues Fruchet <hugues.fruchet@foss.st.com>
Tue, 24 Sep 2024 15:01:10 +0000 (17:01 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 24 Sep 2024 23:59:51 +0000 (23:59 +0000)
This fixes a regression introduced by the merge request
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3801

The extrapolated stride was computed but not used, resulting in the same
stride being applied to all planes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7571>

subprojects/gst-plugins-bad/sys/kms/gstkmsallocator.c

index 3ec2fdb32d6ed6b8f2a8ca1564e7937fc3764d56..84359b078288783b8343ba59969434251ca022e7 100644 (file)
@@ -122,7 +122,7 @@ gst_kms_allocator_memory_create (GstKMSAllocator * allocator,
     /* Overwrite the video info's stride and offset using the pitch calculcated
      * by the kms driver. */
     stride = gst_video_format_info_extrapolate_stride (vinfo->finfo, i, pitch);
-    GST_VIDEO_INFO_PLANE_STRIDE (vinfo, i) = pitch;
+    GST_VIDEO_INFO_PLANE_STRIDE (vinfo, i) = stride;
     GST_VIDEO_INFO_PLANE_OFFSET (vinfo, i) = offs;
 
     /* Note that we cannot negotiate special padding betweem each planes,