diff options
author | David Plowman <david.plowman@raspberrypi.com> | 2022-11-04 17:45:09 +0000 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-11-08 17:09:44 +0200 |
commit | fac93292a9d501284dc78d14797a71f3c398c942 (patch) | |
tree | c0a68755031d0152df654d00f5e3c075e44eda0e | |
parent | aa7b374054c72fbde584f8afb1cc2886a46a57e1 (diff) |
libcamera: camera: Fix the isAcquired test
All states count as "acquired" except for "CameraAvailable".
Fixes: dfc6d711c9f7 ("libcamera: Allow concurrent use of cameras from same pipeline handler")
Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-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 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 |