diff options
author | Paul Elder <paul.elder@ideasonboard.com> | 2020-06-23 14:33:39 +0900 |
---|---|---|
committer | Paul Elder <paul.elder@ideasonboard.com> | 2020-06-25 23:47:13 +0900 |
commit | 6a5d416b3793401d8bad6e3d398847eeb1158ba0 (patch) | |
tree | 603b8684c426054d8db48be778aaf85b1efe4abe /src/v4l2 | |
parent | b3dc3d7cf248c2225cd38f6dc54b47d8e012247e (diff) |
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>
Diffstat (limited to 'src/v4l2')
-rw-r--r-- | src/v4l2/v4l2_camera_proxy.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp index 08fd3fdc..225ce42b 100644 --- a/src/v4l2/v4l2_camera_proxy.cpp +++ b/src/v4l2/v4l2_camera_proxy.cpp @@ -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(); |