[libcamera-devel] [PATCH] libcamera: camera: Fix the isAcquired test
David Plowman
david.plowman at raspberrypi.com
Fri Nov 4 18:45:09 CET 2022
All states count as "acquired" except for "CameraAvailable".
Signed-off-by: David Plowman <david.plowman at raspberrypi.com>
---
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 9fe29ca9..f0575c13 100644
--- a/src/libcamera/camera.cpp
+++ b/src/libcamera/camera.cpp
@@ -501,7 +501,7 @@ static const char *const camera_state_names[] = {
bool Camera::Private::isAcquired() const
{
- return state_.load(std::memory_order_acquire) == CameraRunning;
+ return state_.load(std::memory_order_acquire) != CameraAvailable;
}
bool Camera::Private::isRunning() const
--
2.30.2
More information about the libcamera-devel
mailing list