[libcamera-devel] [PATCH v4 5/9] android: camera_device: Clear streams_ in close()
Jacopo Mondi
jacopo at jmondi.org
Wed Sep 30 15:27:03 CEST 2020
When closing the CameraDevice, clear the streams_ vector to release all
the created CameraStream instances.
Suggested-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
---
src/android/camera_device.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index d73d10d9d449..8692771a4538 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -534,6 +534,7 @@ int CameraDevice::open(const hw_module_t *hardwareModule)
void CameraDevice::close()
{
+ streams_.clear();
allocator_.freeAll();
camera_->stop();
--
2.28.0
More information about the libcamera-devel
mailing list