aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/bttv-driver.c
diff options
context:
space:
mode:
authorMichael H. Schimek <mschimek@gmx.at>2005-12-01 00:51:37 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-12-01 15:48:58 -0800
commit13c72805b3d922d85d5c470e851c93e8f8c076d8 (patch)
treef8ceb2a43f52b1cdf8da7ab429963dca16a2482a /drivers/media/video/bttv-driver.c
parent[PATCH] V4L: Makes needlessly global code static (diff)
downloadlinux-dev-13c72805b3d922d85d5c470e851c93e8f8c076d8.tar.xz
linux-dev-13c72805b3d922d85d5c470e851c93e8f8c076d8.zip
[PATCH] V4L: Fixes Bttv raw format to fix VIDIOCSPICT ioctl
Fixes Bttv raw format to fix VIDIOCSPICT ioctl. Signed-off-by: Michael H. Schimek <mschimek@gmx.at> Signed-off-by: Nickolay V. Shmyrev <nshmyrev@yandex.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/video/bttv-driver.c')
-rw-r--r--drivers/media/video/bttv-driver.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/video/bttv-driver.c b/drivers/media/video/bttv-driver.c
index fdaff5bd6331..6fcc20de48d3 100644
--- a/drivers/media/video/bttv-driver.c
+++ b/drivers/media/video/bttv-driver.c
@@ -2290,6 +2290,15 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
retval = -EINVAL;
goto fh_unlock_and_return;
}
+ if (fmt->flags & FORMAT_FLAGS_RAW) {
+ /* VIDIOCMCAPTURE uses gbufsize, not RAW_BPL *
+ RAW_LINES * 2. F1 is stored at offset 0, F2
+ at buffer size / 2. */
+ fh->width = RAW_BPL;
+ fh->height = gbufsize / RAW_BPL;
+ btv->init.width = RAW_BPL;
+ btv->init.height = gbufsize / RAW_BPL;
+ }
fh->ovfmt = fmt;
fh->fmt = fmt;
btv->init.ovfmt = fmt;