android: camera_device: Return Camera as shared_ptr

Return the Camera wrapped by the CameraDevice as a shared_ptr.
This will be required to construct the FrameBuffer allocator in
the CameraStream class.

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
Jacopo Mondi 2020-10-03 13:17:35 +02:00
parent e3393f147e
commit fc1fcb5bc9
2 changed files with 2 additions and 2 deletions

View file

@ -155,7 +155,7 @@ void CameraHalManager::cameraRemoved(std::shared_ptr<Camera> cam)
auto iter = std::find_if(cameras_.begin(), cameras_.end(),
[&cam](std::shared_ptr<CameraDevice> &camera) {
return cam.get() == camera->camera();
return cam == camera->camera();
});
if (iter == cameras_.end())
return;