Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320141
b: refs/heads/master
c: 2e90c6c
h: refs/heads/master
i:
  320139: 0a37c44
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Jul 6, 2012
1 parent 271644a commit aae81a8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f2ba5a0b469952328b03e239acacd77858f19fb3
refs/heads/master: 2e90c6c38a3a5775cccd728eea74fdacbb29e029
10 changes: 9 additions & 1 deletion trunk/drivers/media/video/vivi.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,13 @@ static int queue_setup(struct vb2_queue *vq, const struct v4l2_format *fmt,
struct vivi_dev *dev = vb2_get_drv_priv(vq);
unsigned long size;

size = dev->width * dev->height * dev->pixelsize;
if (fmt)
size = fmt->fmt.pix.sizeimage;
else
size = dev->width * dev->height * dev->pixelsize;

if (size == 0)
return -EINVAL;

if (0 == *nbuffers)
*nbuffers = 32;
Expand Down Expand Up @@ -1180,6 +1186,8 @@ static const struct v4l2_ioctl_ops vivi_ioctl_ops = {
.vidioc_try_fmt_vid_cap = vidioc_try_fmt_vid_cap,
.vidioc_s_fmt_vid_cap = vidioc_s_fmt_vid_cap,
.vidioc_reqbufs = vb2_ioctl_reqbufs,
.vidioc_create_bufs = vb2_ioctl_create_bufs,
.vidioc_prepare_buf = vb2_ioctl_prepare_buf,
.vidioc_querybuf = vb2_ioctl_querybuf,
.vidioc_qbuf = vb2_ioctl_qbuf,
.vidioc_dqbuf = vb2_ioctl_dqbuf,
Expand Down

0 comments on commit aae81a8

Please sign in to comment.