From 06166a331ceee6dfca05ee422207ebdc88138699 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 18 Aug 2019 02:00:19 +0300 Subject: android: camera_hal_manager: Stop thread when destroying The CameraHalManager starts a thread that is never stopped. This leads to the thread being destroyed while running, which causes a crash. Fix this by stopping the thread and waiting for it to finish in the destructor of the CameraHalManager. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi --- src/android/camera_hal_manager.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/android/camera_hal_manager.h') diff --git a/src/android/camera_hal_manager.h b/src/android/camera_hal_manager.h index 8228623a..502115cf 100644 --- a/src/android/camera_hal_manager.h +++ b/src/android/camera_hal_manager.h @@ -24,6 +24,8 @@ class CameraProxy; class CameraHalManager : public libcamera::Thread { public: + ~CameraHalManager(); + int init(); CameraProxy *open(unsigned int id, const hw_module_t *module); -- cgit v1.2.1