Skip to content

Commit

Permalink
v4l2: Fix bytesused==0 warning
Browse files Browse the repository at this point in the history
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
  • Loading branch information
mripard committed Nov 14, 2018
1 parent efcd083 commit 5ac0351
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion v4l2.c
Expand Up @@ -341,7 +341,10 @@ static int 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 (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;
Expand Down

0 comments on commit 5ac0351

Please sign in to comment.