[libcamera-devel] [PATCH 4/8] android: camera_device: Clear allocator at configureStream

Niklas Söderlund niklas.soderlund at ragnatech.se
Thu Sep 10 13:20:41 CEST 2020


Hi Jacopo,

Thanks for your patch.

On 2020-09-09 17:54:53 +0200, Jacopo Mondi wrote:
> 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>

Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>

> ---
>  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
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

-- 
Regards,
Niklas Söderlund


More information about the libcamera-devel mailing list