v4l2: v4l2_camera_proxy: noop if streamon when stream is already on

If VIDIOC_STREMAON is called when the stream is already on, do a noop.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Paul Elder 2020-06-23 14:33:39 +09:00
parent b3dc3d7cf2
commit 6a5d416b37

View file

@ -623,6 +623,9 @@ int V4L2CameraProxy::vidioc_streamon(V4L2CameraFile *file, int *arg)
if (!hasOwnership(file))
return -EBUSY;
if (vcam_->isRunning())
return 0;
currentBuf_ = 0;
return vcam_->streamOn();