summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorNickolay V. Shmyrev <devnull@localhost>2005-11-24 09:12:53 +0000
committerNickolay V. Shmyrev <devnull@localhost>2005-11-24 09:12:53 +0000
commit2356e0a7e4bb7f34989f32c0fd94cca6e703eb31 (patch)
treeeed4850e4e1ec1532dcfa2b1915a519c14b27473 /linux/drivers/media/video
parent4957d340a49019b0d81efbb538fd07e55dc7679d (diff)
downloadmediapointer-dvb-s2-2356e0a7e4bb7f34989f32c0fd94cca6e703eb31.tar.gz
mediapointer-dvb-s2-2356e0a7e4bb7f34989f32c0fd94cca6e703eb31.tar.bz2
bttv raw format fix to fix VIDIOCSPICT ioctl.
From: Michael H. Schimek <mschimek@gmx.at> * ../v4l/linux/drivers/media/video/bttv-driver.c: * ../v4l/linux/drivers/media/video/video-buf.c: bttv raw format fix to fix VIDIOCSPICT ioctl. Signed-off-by: Michael H. Schimek <mschimek@gmx.at> Signed-off-by: Nickolay V. Shmyrev <nshmyrev@yandex.ru>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/bttv-driver.c11
-rw-r--r--linux/drivers/media/video/video-buf.c3
2 files changed, 12 insertions, 2 deletions
diff --git a/linux/drivers/media/video/bttv-driver.c b/linux/drivers/media/video/bttv-driver.c
index 68b8c339d..2940b9016 100644
--- a/linux/drivers/media/video/bttv-driver.c
+++ b/linux/drivers/media/video/bttv-driver.c
@@ -1,5 +1,5 @@
/*
- $Id: bttv-driver.c,v 1.71 2005/11/18 15:35:33 nsh Exp $
+ $Id: bttv-driver.c,v 1.72 2005/11/24 09:12:53 nsh Exp $
bttv - Bt848 frame grabber driver
@@ -2317,6 +2317,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;
diff --git a/linux/drivers/media/video/video-buf.c b/linux/drivers/media/video/video-buf.c
index 6d082f3ef..27980d034 100644
--- a/linux/drivers/media/video/video-buf.c
+++ b/linux/drivers/media/video/video-buf.c
@@ -1,5 +1,5 @@
/*
- * $Id: video-buf.c,v 1.22 2005/11/18 15:31:12 nsh Exp $
+ * $Id: video-buf.c,v 1.23 2005/11/24 09:12:53 nsh Exp $
*
* generic helper functions for video4linux capture buffers, to handle
* memory management and PCI DMA. Right now bttv + saa7134 use it.
@@ -823,6 +823,7 @@ ssize_t videobuf_read_one(struct videobuf_queue *q,
if (NULL == q->read_buf)
goto done;
q->read_buf->memory = V4L2_MEMORY_USERPTR;
+ q->read_buf->bsize = count; /* preferred size */
field = videobuf_next_field(q);
retval = q->ops->buf_prepare(q,q->read_buf,field);
if (0 != retval) {