[libcamera-devel] [PATCH 4/8] android: camera_device: Clear allocator at configureStream
Jacopo Mondi
jacopo at jmondi.org
Wed Sep 9 17:54:53 CEST 2020
The configureStream operation might be called by the Android framework
in two successive capture session without going through a close().
Clear all the allocated buffers before configuring the camera streams.
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 98cfa3d5aa59..d35c6b93b654 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -1187,6 +1187,7 @@ int CameraDevice::configureStreams(camera3_stream_configuration_t *stream_list)
*/
streams_.clear();
streams_.reserve(stream_list->num_streams);
+ allocator_.clear();
/* First handle all non-MJPEG streams. */
camera3_stream_t *jpegStream = nullptr;
--
2.28.0
More information about the libcamera-devel
mailing list