v4l2allocator: Fix userptr importation

The length passed to the driver was always 0 instead of the size of
the memory. This would fail validation in videobuf2.
This commit is contained in:
Nicolas Dufresne 2018-07-13 14:41:13 -04:00
parent 38b68cbbd7
commit 0649b0ab0f

View File

@ -1149,13 +1149,11 @@ gst_v4l2_allocator_import_userptr (GstV4l2Allocator * allocator,
for (i = 0; i < group->n_mem; i++) { for (i = 0; i < group->n_mem; i++) {
gsize maxsize, psize; gsize maxsize, psize;
if (V4L2_TYPE_IS_MULTIPLANAR (obj->type)) { /* TODO request used size and maxsize seperatly */
maxsize = group->planes[i].length; if (V4L2_TYPE_IS_MULTIPLANAR (obj->type))
psize = size[i]; maxsize = psize = size[i];
} else { else
maxsize = group->planes[i].length; maxsize = psize = img_size;
psize = img_size;
}
g_assert (psize <= img_size); g_assert (psize <= img_size);