From 34477392ceff6d4d5473679f33a6a73cbe7326de Mon Sep 17 00:00:00 2001 From: Paul Elder Date: Tue, 22 Nov 2022 10:54:54 +0000 Subject: 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 Reviewed-by: Kieran Bingham Signed-off-by: Paul Elder Signed-off-by: Kieran Bingham --- lib/v4l2.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') 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; -- cgit v1.2.3