]> git.baikalelectronics.ru Git - kernel.git/commit
V4L/DVB (5888): zr36067: Driver was not returning correct image size
authorTrent Piepho <xyzzy@speakeasy.org>
Tue, 17 Jul 2007 21:29:43 +0000 (18:29 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Mon, 30 Jul 2007 19:26:25 +0000 (16:26 -0300)
commit4c11d36419218599ef6356616b85185664f8d36c
tree700c014464227558914fa302a3056cfc6c779bf8
parent03e20b9836bb97b23eaccac915b3eff8d5f2cc93
V4L/DVB (5888): zr36067: Driver was not returning correct image size

The driver was returning the size of the (fixed) buffer it allocated as the
sizeimage field in the v4l2 pixel format, rather than the actual size of the
image.  For example, a 192x128 YUYV image is 49152 bytes but the driver would
always return 131072 bytes since if that was the size of the v4l buffer.

This violates the v4l2 spec, which says that sizeimage should be the actual
size of the image for uncompressed formats.  It also caused mplayer to crash.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Ronald S. Bultje <rbultje@ronald.bitfreak.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/zoran_driver.c