summaryrefslogtreecommitdiff
path: root/src/android/camera_hal_manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/android/camera_hal_manager.cpp')
-rw-r--r--src/android/camera_hal_manager.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/android/camera_hal_manager.cpp b/src/android/camera_hal_manager.cpp
index cf981720..22f0323b 100644
--- a/src/android/camera_hal_manager.cpp
+++ b/src/android/camera_hal_manager.cpp
@@ -59,7 +59,7 @@ void CameraHalManager::run()
* order to bind them to the camera HAL manager thread that
* executes the event dispatcher.
*/
- cameraManager_ = libcamera::CameraManager::instance();
+ cameraManager_ = new CameraManager();
int ret = cameraManager_->start();
if (ret) {
@@ -93,7 +93,10 @@ void CameraHalManager::run()
/* Clean up the resources we have allocated. */
proxies_.clear();
+
cameraManager_->stop();
+ delete cameraManager_;
+ cameraManager_ = nullptr;
}
CameraProxy *CameraHalManager::open(unsigned int id,