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.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/android/camera_hal_manager.cpp b/src/android/camera_hal_manager.cpp
index 3d6d2b45..3a744af5 100644
--- a/src/android/camera_hal_manager.cpp
+++ b/src/android/camera_hal_manager.cpp
@@ -64,12 +64,12 @@ int CameraHalManager::init()
*/
unsigned int index = 0;
for (auto &cam : cameraManager_->cameras()) {
- CameraDevice *camera = new CameraDevice(index, cam);
+ std::shared_ptr<CameraDevice> camera = CameraDevice::create(index, cam);
ret = camera->initialize();
if (ret)
continue;
- cameras_.emplace_back(camera);
+ cameras_.emplace_back(std::move(camera));
++index;
}