V4L/DVB (4427): Fix V4L1 Compat for VIDIOCGPICT ioctl
authorMauro Carvalho Chehab <mchehab@infradead.org>
Tue, 8 Aug 2006 12:10:16 +0000 (09:10 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Tue, 8 Aug 2006 18:53:04 +0000 (15:53 -0300)
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/v4l1-compat.c

index d83a2c84d2334a279c7febcd070f6f7ef7a27899..d7c3fcbc80f7b5585d2a9463ece0f31695b566ee 100644 (file)
@@ -599,6 +599,10 @@ v4l_compat_translate_ioctl(struct inode         *inode,
                        dprintk("VIDIOCGPICT / VIDIOC_G_FMT: %d\n",err);
                        break;
                }
+
+               pict->depth   = ((fmt2->fmt.pix.bytesperline<<3)
+                                + (fmt2->fmt.pix.width-1) )
+                                /fmt2->fmt.pix.width;
                pict->palette = pixelformat_to_palette(
                        fmt2->fmt.pix.pixelformat);
                break;