forked from marfrit/libva-v4l2-request-fourier
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:
+4
-1
@@ -348,7 +348,10 @@ int v4l2_queue_buffer(int video_fd, int request_fd, unsigned int type,
|
|||||||
buffer.m.planes = planes;
|
buffer.m.planes = planes;
|
||||||
|
|
||||||
for (i = 0; i < buffers_count; i++)
|
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) {
|
if (request_fd >= 0) {
|
||||||
buffer.flags = V4L2_BUF_FLAG_REQUEST_FD;
|
buffer.flags = V4L2_BUF_FLAG_REQUEST_FD;
|
||||||
|
|||||||
Reference in New Issue
Block a user