[libcamera-devel] [PATCH v2 3/8] android: CameraHalManager: Fix a function call of a moved Camera
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Wed Mar 24 22:01:54 CET 2021
Hi Hiro,
Thank you for the patch.
On Wed, Mar 24, 2021 at 04:07:52PM +0900, Hirokazu Honda wrote:
> libcamera::Camera::id() is called after std::move() in
> cameraAdded(). This fixes the issue by not executing std::move().
>
> Signed-off-by: Hirokazu Honda <hiroh at chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
> src/android/camera_hal_manager.cpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/android/camera_hal_manager.cpp b/src/android/camera_hal_manager.cpp
> index b501f8db..f70cd8a8 100644
> --- a/src/android/camera_hal_manager.cpp
> +++ b/src/android/camera_hal_manager.cpp
> @@ -115,7 +115,7 @@ 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, std::move(cam));
> + std::unique_ptr<CameraDevice> camera = CameraDevice::create(id, cam);
> int ret = camera->initialize();
> if (ret) {
> LOG(HAL, Error) << "Failed to initialize camera: " << cam->id();
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list