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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5461>
This commit is contained in:
Nicolas Dufresne 2023-10-13 15:04:22 -04:00 committed by GStreamer Marge Bot
parent e00682a4c0
commit 0e5f5b413c

View file

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