Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 137970
b: refs/heads/master
c: 84c1b09
h: refs/heads/master
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Mar 30, 2009
1 parent bd9e047 commit acfb911
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 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: 5ca75b00ffd0df5bae16e84830f2710537efed11
refs/heads/master: 84c1b09495ea366276726b0df2dcd7898cda9d0f
10 changes: 7 additions & 3 deletions trunk/drivers/media/video/zoran/zoran_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -2493,24 +2493,28 @@ static int zoran_overlay(struct file *file, void *__fh, unsigned int on)
return res;
}

static int zoran_streamoff(struct file *file, void *__fh, enum v4l2_buf_type type);

static int zoran_reqbufs(struct file *file, void *__fh, struct v4l2_requestbuffers *req)
{
struct zoran_fh *fh = __fh;
struct zoran *zr = fh->zr;
int res = 0;

if (req->memory != V4L2_MEMORY_MMAP) {
dprintk(1,
dprintk(2,
KERN_ERR
"%s: only MEMORY_MMAP capture is supported, not %d\n",
ZR_DEVNAME(zr), req->memory);
return -EINVAL;
}

mutex_lock(&zr->resource_lock);
if (req->count == 0)
return zoran_streamoff(file, fh, req->type);

mutex_lock(&zr->resource_lock);
if (fh->v4l_buffers.allocated || fh->jpg_buffers.allocated) {
dprintk(1,
dprintk(2,
KERN_ERR
"%s: VIDIOC_REQBUFS - buffers already allocated\n",
ZR_DEVNAME(zr));
Expand Down

0 comments on commit acfb911

Please sign in to comment.