Ioctl VIDIOC_S_FMT is supposed to fill the colorspace value in the
returned buffer.

Signed-off-by: Jean Delvare <[EMAIL PROTECTED]>
Cc: Ronald S. Bultje <[EMAIL PROTECTED]>
---
I'm not sure who uses this nor if it is required by the V4L2
specification, but I guess it can't hurt?

 drivers/media/video/zoran_driver.c |    4 ++++
 1 file changed, 4 insertions(+)

--- linux-2.6.27-rc5.orig/drivers/media/video/zoran_driver.c    2008-09-04 
14:12:40.000000000 +0200
+++ linux-2.6.27-rc5/drivers/media/video/zoran_driver.c 2008-09-04 
14:14:07.000000000 +0200
@@ -2804,6 +2804,8 @@ zoran_do_ioctl (struct inode *inode,
                                fmt->fmt.pix.bytesperline = 0;
                                fmt->fmt.pix.sizeimage =
                                    fh->jpg_buffers.buffer_size;
+                               fmt->fmt.pix.colorspace =
+                                   V4L2_COLORSPACE_SMPTE170M;
 
                                /* we hereby abuse this variable to show that
                                 * we're gonna do mjpeg capture */
@@ -2863,6 +2865,8 @@ zoran_do_ioctl (struct inode *inode,
                                fmt->fmt.pix.sizeimage =
                                        fh->v4l_settings.height *
                                        fh->v4l_settings.bytesperline;
+                               fmt->fmt.pix.colorspace =
+                                       fh->v4l_settings.format->colorspace;
                                if (BUZ_MAX_HEIGHT <
                                    (fh->v4l_settings.height * 2))
                                        fmt->fmt.pix.field =


-- 
Jean Delvare

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to