v4l2allocator: Fix invalid imported dmabuf fd

Fix a typo that set userptr to dmabuf fd. It leads to failure of
dmabuf-import io-mode.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2935>
This commit is contained in:
Jianhui Dai 2022-08-24 17:30:34 +08:00
parent 8756f523d1
commit 625e74100d

View file

@ -1134,7 +1134,7 @@ gst_v4l2_allocator_import_dmabuf (GstV4l2Allocator * allocator,
if (!V4L2_TYPE_IS_MULTIPLANAR (obj->type)) {
group->buffer.bytesused = group->planes[0].bytesused;
group->buffer.length = group->planes[0].length;
group->buffer.m.fd = group->planes[0].m.userptr;
group->buffer.m.fd = group->planes[0].m.fd;
/* FIXME Check if data_offset > 0 and fail for non-multi-planar */
g_assert (group->planes[0].data_offset == 0);