v4l2: v4l2_camera_proxy: Disallow dqbuf when not streaming
Make VIDIOC_DQBUF return -EINVAL if the stream is not turned on. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
d45d53cde0
commit
b3dc3d7cf2
1 changed files with 3 additions and 0 deletions
|
@ -580,6 +580,9 @@ int V4L2CameraProxy::vidioc_dqbuf(V4L2CameraFile *file, struct v4l2_buffer *arg)
|
||||||
if (!hasOwnership(file))
|
if (!hasOwnership(file))
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
|
|
||||||
|
if (!vcam_->isRunning())
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
if (!validateBufferType(arg->type) ||
|
if (!validateBufferType(arg->type) ||
|
||||||
!validateMemoryType(arg->memory))
|
!validateMemoryType(arg->memory))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue