Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242070
b: refs/heads/master
c: 31901a0
h: refs/heads/master
v: v3
  • Loading branch information
Marek Szyprowski authored and Mauro Carvalho Chehab committed Mar 22, 2011
1 parent 5833c30 commit d68df90
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a9bb36aa0d6547aa0ab3d5cfde08e8651bd460bc
refs/heads/master: 31901a078af29c33c736dcbf815656920e904632
7 changes: 7 additions & 0 deletions trunk/drivers/media/video/videobuf2-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,13 @@ int vb2_reqbufs(struct vb2_queue *q, struct v4l2_requestbuffers *req)
return -EINVAL;
}

/*
* If the same number of buffers and memory access method is requested
* then return immediately.
*/
if (q->memory == req->memory && req->count == q->num_buffers)
return 0;

if (req->count == 0 || q->num_buffers != 0 || q->memory != req->memory) {
/*
* We already have buffers allocated, so first check if they
Expand Down

0 comments on commit d68df90

Please sign in to comment.