]> asedeno.scripts.mit.edu Git - linux.git/commit
media: vivid: fix vid_out_buf_prepare()
authorHans Verkuil <hverkuil@xs4all.nl>
Fri, 25 Jan 2019 15:40:04 +0000 (13:40 -0200)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Thu, 31 Jan 2019 11:32:05 +0000 (09:32 -0200)
commit560c053deb94ff65b22a87f28e8e2fab5940555c
tree7a80b3118cd2997947c4eda38931b06386af6a19
parent1284ed59a147c27cb882e49213571f7d52976eb5
media: vivid: fix vid_out_buf_prepare()

The wrong size check was performed for output formats like NV24 which
set vfmt->buffers to 1, but vfmt->planes is 2. It was incorrectly
checking the payload size for plane 1, which doesn't exist.

Note: vfmt->buffers refers to the number of per-plane-buffers that
should be allocated. vfmt->planes refers to the number of planes
that make up an image. vfmt->planes may be > vfmt->buffers.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/vivid/vivid-vid-out.c