diff options
author | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2019-03-06 00:48:46 +0100 |
---|---|---|
committer | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2019-03-10 23:21:09 +0100 |
commit | 823fc8e25b41a42769421f27f39fab454e1339fc (patch) | |
tree | f4532769f082c1c55b50c223bd8fab6bfc466e90 /src | |
parent | a3b8083f54beebd44e16facd61d1355cab5e6480 (diff) |
libcamera: camera: Fix access bug in configureStreams()
It is not permitted to configure streams before a camera is acquired.
Fixes: 77100a7578d8a0cc ("libcamera: camera: add state machine to control access from applications")
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/libcamera/camera.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp index e3144c5b..8ee9cc08 100644 --- a/src/libcamera/camera.cpp +++ b/src/libcamera/camera.cpp @@ -405,7 +405,7 @@ int Camera::configureStreams(std::map<Stream *, StreamConfiguration> &config) if (disconnected_) return -ENODEV; - if (!stateBetween(CameraAvailable, CameraConfigured)) + if (!stateBetween(CameraAcquired, CameraConfigured)) return -EACCES; if (!config.size()) { |