]> err.no Git - linux-2.6/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)
commitbb2e033913f14b2f9f6745e206c3ea5df481b4fd
tree700c014464227558914fa302a3056cfc6c779bf8
parente42af83f4874ebb2c6af59a05dbe5d45114fb0ed
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