summaryrefslogtreecommitdiff
path: root/src/android/camera_device.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/android/camera_device.cpp')
-rw-r--r--src/android/camera_device.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index c7686557..db400e74 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -436,7 +436,11 @@ void CameraDevice::stop()
worker_.stop();
camera_->stop();
- descriptors_ = {};
+ {
+ MutexLocker descriptorsLock(descriptorsMutex_);
+ descriptors_ = {};
+ }
+
streams_.clear();
state_ = State::Stopped;
@@ -933,6 +937,9 @@ int CameraDevice::processCaptureRequest(camera3_capture_request_t *camera3Reques
*/
FrameBuffer *frameBuffer = nullptr;
int acquireFence = -1;
+
+ MutexLocker lock(descriptor->streamsProcessMutex_);
+
switch (cameraStream->type()) {
case CameraStream::Type::Mapped:
/*