aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2012-09-28 05:24:18 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-10-05 21:23:24 -0400
commit3c0b60618118745220bc0f9bf27e51e37367427c (patch)
tree3dddb4067a2d970eb8aac24944a127588f0c0f9a
parent32a772603173f9e1bf675c01e4649e3fe3b794bc (diff)
[media] videobuf2-core: fill in length field for multiplanar buffers
length should be set to num_planes in __fill_v4l2_buffer(). That way the caller knows how many planes there are in the buffer. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/v4l2-core/videobuf2-core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
index 5a132b286894..432df119af27 100644
--- a/drivers/media/v4l2-core/videobuf2-core.c
+++ b/drivers/media/v4l2-core/videobuf2-core.c
@@ -348,6 +348,7 @@ static void __fill_v4l2_buffer(struct vb2_buffer *vb, struct v4l2_buffer *b)
348 * Fill in plane-related data if userspace provided an array 348 * Fill in plane-related data if userspace provided an array
349 * for it. The caller has already verified memory and size. 349 * for it. The caller has already verified memory and size.
350 */ 350 */
351 b->length = vb->num_planes;
351 memcpy(b->m.planes, vb->v4l2_planes, 352 memcpy(b->m.planes, vb->v4l2_planes,
352 b->length * sizeof(struct v4l2_plane)); 353 b->length * sizeof(struct v4l2_plane));
353 } else { 354 } else {