diff options
author | Michael H. Schimek <mschimek@gmx.at> | 2005-12-01 03:51:37 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-12-01 18:48:58 -0500 |
commit | 13c72805b3d922d85d5c470e851c93e8f8c076d8 (patch) | |
tree | f8ceb2a43f52b1cdf8da7ab429963dca16a2482a | |
parent | 943a49027b6d9829b737e6da3d72b867a7a6f832 (diff) |
[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>
-rw-r--r-- | drivers/media/video/bttv-driver.c | 9 | ||||
-rw-r--r-- | drivers/media/video/video-buf.c | 1 |
2 files changed, 10 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, | |||
2290 | retval = -EINVAL; | 2290 | retval = -EINVAL; |
2291 | goto fh_unlock_and_return; | 2291 | goto fh_unlock_and_return; |
2292 | } | 2292 | } |
2293 | if (fmt->flags & FORMAT_FLAGS_RAW) { | ||
2294 | /* VIDIOCMCAPTURE uses gbufsize, not RAW_BPL * | ||
2295 | RAW_LINES * 2. F1 is stored at offset 0, F2 | ||
2296 | at buffer size / 2. */ | ||
2297 | fh->width = RAW_BPL; | ||
2298 | fh->height = gbufsize / RAW_BPL; | ||
2299 | btv->init.width = RAW_BPL; | ||
2300 | btv->init.height = gbufsize / RAW_BPL; | ||
2301 | } | ||
2293 | fh->ovfmt = fmt; | 2302 | fh->ovfmt = fmt; |
2294 | fh->fmt = fmt; | 2303 | fh->fmt = fmt; |
2295 | btv->init.ovfmt = fmt; | 2304 | btv->init.ovfmt = fmt; |
diff --git a/drivers/media/video/video-buf.c b/drivers/media/video/video-buf.c index bd34f81dbc69..9a6bf287e26a 100644 --- a/drivers/media/video/video-buf.c +++ b/drivers/media/video/video-buf.c | |||
@@ -816,6 +816,7 @@ ssize_t videobuf_read_one(struct videobuf_queue *q, | |||
816 | if (NULL == q->read_buf) | 816 | if (NULL == q->read_buf) |
817 | goto done; | 817 | goto done; |
818 | q->read_buf->memory = V4L2_MEMORY_USERPTR; | 818 | q->read_buf->memory = V4L2_MEMORY_USERPTR; |
819 | q->read_buf->bsize = count; /* preferred size */ | ||
819 | field = videobuf_next_field(q); | 820 | field = videobuf_next_field(q); |
820 | retval = q->ops->buf_prepare(q,q->read_buf,field); | 821 | retval = q->ops->buf_prepare(q,q->read_buf,field); |
821 | if (0 != retval) { | 822 | if (0 != retval) { |