From 0e5f5b413cc94d3e21345d4862dc74561b7eef39 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Fri, 13 Oct 2023 15:04:22 -0400 Subject: [PATCH] glupload: Plane size is not known for DMA_DRM For these format, the plane size is not known, simply use 1 when searching for the memory object in the GstBuffer array. Part-of: --- subprojects/gst-plugins-base/gst-libs/gst/gl/gstglupload.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglupload.c b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglupload.c index 063a67a3a7..9a4695c23e 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglupload.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglupload.c @@ -1463,7 +1463,10 @@ _dma_buf_upload_accept (gpointer impl, GstBuffer * buffer, GstCaps * in_caps, guint mem_idx; gsize mem_skip; - plane_size = gst_gl_get_plane_data_size (in_info, NULL, i); + if (GST_VIDEO_INFO_FORMAT (in_info) == GST_VIDEO_FORMAT_DMA_DRM) + plane_size = 1; + else + plane_size = gst_gl_get_plane_data_size (in_info, NULL, i); if (!gst_buffer_find_memory (buffer, in_info->offset[i], plane_size, &mem_idx, &length, &mem_skip)) {