summaryrefslogtreecommitdiff
path: root/lib/v4l2.c
diff options
context:
space:
mode:
authorPaul Elder <paul.elder@ideasonboard.com>2022-11-22 10:54:54 +0000
committerKieran Bingham <kieran.bingham@ideasonboard.com>2022-11-22 16:02:25 +0000
commit34477392ceff6d4d5473679f33a6a73cbe7326de (patch)
tree86fe1ae04e629b5f79054247fb8a73cf2b5a821b /lib/v4l2.c
parent6a466b3e46b843385cea82dd6cc042aefdb986ed (diff)
v4l2: write size value when dequeueing buffer
When we dequeue a buffer from a V4L2 device, it would be good to know the size of the buffer. Save it to our struct video_buffer when dequeueing. Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'lib/v4l2.c')
-rw-r--r--lib/v4l2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/v4l2.c b/lib/v4l2.c
index 7bcbd73..01129a5 100644
--- a/lib/v4l2.c
+++ b/lib/v4l2.c
@@ -789,6 +789,7 @@ int v4l2_dequeue_buffer(struct v4l2_device *dev, struct video_buffer *buffer)
}
buffer->index = buf.index;
+ buffer->size = buf.length;
buffer->mem = dev->buffers.buffers[buf.index].mem;
buffer->bytesused = buf.bytesused;
buffer->timestamp = buf.timestamp;