diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2014-04-07 11:57:48 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-04-16 21:43:13 (GMT) |
commit | 61bd8fb37db948154ae01c8ed43a86633ae1d2be (patch) | |
tree | 90f96b0caa8834d2f9fcc2c5b8714106045fdecf /block | |
parent | 412376a1532a9eb3eb66c9d07175f21cdbebdc09 (diff) | |
download | linux-61bd8fb37db948154ae01c8ed43a86633ae1d2be.tar.xz |
[media] vb2: if bytesused is 0, then fill with output buffer length
The application should really always fill in bytesused for output
buffers, unfortunately the vb2 framework never checked for that.
So for single planar formats replace a bytesused of 0 by the length
of the buffer, and for multiplanar format do the same if bytesused is
0 for ALL planes.
This seems to be what the user really intended if v4l2_buffer was
just memset to 0.
I'm afraid that just checking for this and returning an error would
break too many applications. Quite a few drivers never check for bytesused
at all and just use the buffer length instead.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Pawel Osciak <pawel@osciak.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions