v4l2allocator: fix memory type in allocator probe
authorJean-Christophe Trotin <jean-christophe.trotin@st.com>
Mon, 16 Jan 2017 14:17:15 +0000 (15:17 +0100)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Mon, 16 Jan 2017 15:19:18 +0000 (10:19 -0500)
The buffer memory type provided to the VIDIOC_CREATE_BUFS ioctl shall
be set with the value ("memory") given as input parameter of the
gst_v4l2_allocator_probe() function.

https://bugzilla.gnome.org/show_bug.cgi?id=777327

sys/v4l2/gstv4l2allocator.c

index 655c2ca..7d9b1ec 100644 (file)
@@ -489,7 +489,7 @@ gst_v4l2_allocator_probe (GstV4l2Allocator * allocator, guint32 memory,
 
     flags |= breq_flag;
 
-    bcreate.memory = allocator->type;
+    bcreate.memory = memory;
     bcreate.format = allocator->format;
 
     if ((v4l2_ioctl (allocator->video_fd, VIDIOC_CREATE_BUFS, &bcreate) == 0))