Skip to content

Commit

Permalink
prevent multiple output streams
Browse files Browse the repository at this point in the history
  • Loading branch information
IOhannes m zmölnig authored and IOhannes m zmölnig committed Apr 25, 2023
1 parent 19752a7 commit d78f95b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions v4l2loopback.c
Original file line number Diff line number Diff line change
Expand Up @@ -1506,6 +1506,10 @@ static int vidioc_reqbufs(struct file *file, void *fh,
return 0;
}

if (V4L2_TYPE_IS_OUTPUT(b->type) && (!dev->ready_for_output)) {
return -EBUSY;
}

init_buffers(dev);
switch (b->memory) {
case V4L2_MEMORY_MMAP:
Expand Down

0 comments on commit d78f95b

Please sign in to comment.