summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/android/camera_hal_manager.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/android/camera_hal_manager.cpp b/src/android/camera_hal_manager.cpp
index 4cd67544..b364f62a 100644
--- a/src/android/camera_hal_manager.cpp
+++ b/src/android/camera_hal_manager.cpp
@@ -133,9 +133,6 @@ void CameraHalManager::cameraAdded(std::shared_ptr<Camera> cam)
}
}
- /* Create a CameraDevice instance to wrap the libcamera Camera. */
- std::unique_ptr<CameraDevice> camera = CameraDevice::create(id, cam);
-
/*
* The configuration file must be valid, and contain a corresponding
* entry for internal cameras. External cameras can be initialized
@@ -155,6 +152,9 @@ void CameraHalManager::cameraAdded(std::shared_ptr<Camera> cam)
return;
}
+ /* Create a CameraDevice instance to wrap the libcamera Camera. */
+ std::unique_ptr<CameraDevice> camera = CameraDevice::create(id, cam);
+
int ret = camera->initialize(cameraConfigData);
if (ret) {
LOG(HAL, Error) << "Failed to initialize camera: " << cam->id();