Fix single planar QBUF ioctl

Commit 7ff2543e64 ("Add support for the single-planar V4L2 API")
missed the VIDIOC_QBUF bytesused parameter. The kernel will
warn loudly if bytesused is not properly defined for an OUTPUT buffer.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
This commit is contained in:
Ezequiel Garcia
2018-10-12 16:42:02 -03:00
parent 2c27ec3794
commit 59cd32bc42
+4 -1
View File
@@ -348,7 +348,10 @@ int v4l2_queue_buffer(int video_fd, int request_fd, unsigned int type,
buffer.m.planes = planes;
for (i = 0; i < buffers_count; i++)
buffer.m.planes[i].bytesused = size;
if (v4l2_type_is_mplane(type))
buffer.m.planes[i].bytesused = size;
else
buffer.bytesused = size;
if (request_fd >= 0) {
buffer.flags = V4L2_BUF_FLAG_REQUEST_FD;