[libcamera-devel] [PATCH 1/5] libcamera: camera: Fix access bug in configureStreams()
Niklas Söderlund
niklas.soderlund at ragnatech.se
Wed Mar 6 03:47:51 CET 2019
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 at ragnatech.se>
---
src/libcamera/camera.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp
index e3144c5b4ab093b2..8ee9cc0866167ae1 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()) {
--
2.21.0
More information about the libcamera-devel
mailing list