summaryrefslogtreecommitdiff
path: root/v4l2.c
diff options
context:
space:
mode:
Diffstat (limited to 'v4l2.c')
-rw-r--r--v4l2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/v4l2.c b/v4l2.c
index 3baf55b..8d5e847 100644
--- a/v4l2.c
+++ b/v4l2.c
@@ -510,6 +510,9 @@ int v4l2_alloc_buffers(struct v4l2_device *dev, enum v4l2_memory memtype,
unsigned int i;
int ret;
+ if (dev->nbufs != 0)
+ return -EBUSY;
+
/* Request the buffers from the driver. */
memset(&rb, 0, sizeof rb);
rb.count = nbufs;