aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/video/bttv-driver.c9
-rw-r--r--drivers/media/video/video-buf.c1
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) {