mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
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:
parent
38b68cbbd7
commit
0649b0ab0f
1 changed files with 5 additions and 7 deletions
|
@ -1149,13 +1149,11 @@ gst_v4l2_allocator_import_userptr (GstV4l2Allocator * allocator,
|
|||
for (i = 0; i < group->n_mem; i++) {
|
||||
gsize maxsize, psize;
|
||||
|
||||
if (V4L2_TYPE_IS_MULTIPLANAR (obj->type)) {
|
||||
maxsize = group->planes[i].length;
|
||||
psize = size[i];
|
||||
} else {
|
||||
maxsize = group->planes[i].length;
|
||||
psize = img_size;
|
||||
}
|
||||
/* TODO request used size and maxsize seperatly */
|
||||
if (V4L2_TYPE_IS_MULTIPLANAR (obj->type))
|
||||
maxsize = psize = size[i];
|
||||
else
|
||||
maxsize = psize = img_size;
|
||||
|
||||
g_assert (psize <= img_size);
|
||||
|
||||
|
|
Loading…
Reference in a new issue