diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2011-08-24 06:36:26 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-09-06 15:03:49 -0300 |
commit | c1426bc727b78808fb956f7402b689144c1506ee (patch) | |
tree | dd6f9667e01bfacd8f9674149c32ef774c2f0605 /include | |
parent | a6bd62be5a3e3a2eee9c0c1d7c04cb52cff3e073 (diff) |
[media] media: vb2: add a check if queued userptr buffer is large enough
Videobuf2 accepted any userptr buffer without verifying if its size is
large enough to store the video data from the driver. The driver reports
the minimal size of video data once in queue_setup and expects that
videobuf2 provides buffers that match these requirements. This patch
adds the required check.
Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/media/videobuf2-core.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index f87472acbc5..496d6e548ef 100644 --- a/include/media/videobuf2-core.h +++ b/include/media/videobuf2-core.h @@ -276,6 +276,7 @@ struct vb2_queue { wait_queue_head_t done_wq; void *alloc_ctx[VIDEO_MAX_PLANES]; + unsigned long plane_sizes[VIDEO_MAX_PLANES]; unsigned int streaming:1; |