Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bb2e033913f14b2f9f6745e206c3ea5df481b4fd
Commit:     bb2e033913f14b2f9f6745e206c3ea5df481b4fd
Parent:     e42af83f4874ebb2c6af59a05dbe5d45114fb0ed
Author:     Trent Piepho <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 17 18:29:43 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Mon Jul 30 16:26:25 2007 -0300

    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 <[EMAIL PROTECTED]>
    Acked-by: Ronald S. Bultje <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/zoran_driver.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/media/video/zoran_driver.c 
b/drivers/media/video/zoran_driver.c
index 37e25c2..0644631 100644
--- a/drivers/media/video/zoran_driver.c
+++ b/drivers/media/video/zoran_driver.c
@@ -2737,7 +2737,8 @@ zoran_do_ioctl (struct inode *inode,
                                fmt->fmt.pix.height =
                                    fh->v4l_settings.height;
                                fmt->fmt.pix.sizeimage =
-                                   fh->v4l_buffers.buffer_size;
+                                   fh->v4l_settings.bytesperline *
+                                   fh->v4l_settings.height;
                                fmt->fmt.pix.pixelformat =
                                    fh->v4l_settings.format->fourcc;
                                fmt->fmt.pix.colorspace =
@@ -2984,8 +2985,9 @@ zoran_do_ioctl (struct inode *inode,
 
                                /* tell the user the
                                 * results/missing stuff */
-                               fmt->fmt.pix.sizeimage = 
fh->v4l_buffers.buffer_size    /*zr->gbpl * zr->gheight */
-                                   ;
+                               fmt->fmt.pix.sizeimage =
+                                       fh->v4l_settings.height *
+                                       fh->v4l_settings.bytesperline;
                                if (BUZ_MAX_HEIGHT <
                                    (fh->v4l_settings.height * 2))
                                        fmt->fmt.pix.field =
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to