[libcamera-devel] [PATCH] qcam: Clear the pool of free requests upon stopCapture()
Niklas Söderlund
niklas.soderlund at ragnatech.se
Thu Nov 12 11:36:34 CET 2020
Hi Paul,
Thanks for your work.
On 2020-11-12 14:02:43 +0900, Paul Elder wrote:
> To enable reusing Request objects, we kept a pool of free Requests. This
> pool was not cleared upon stopping capture, however, which caused a
> segfault when switching to another camera. Fix this by clearing the
> Request pool on stopCapture().
>
> Fixes: c753223ad6b9 ("libcamera, android, cam, gstreamer, qcam, v4l2:
> Reuse Request")
> Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
As Laurent already pointed out the fixes lines shall not be wrapped,
with this fixed,
Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
> ---
> src/qcam/main_window.cpp | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp
> index f140313e..2502ecd4 100644
> --- a/src/qcam/main_window.cpp
> +++ b/src/qcam/main_window.cpp
> @@ -579,6 +579,7 @@ void MainWindow::stopCapture()
> mappedBuffers_.clear();
>
> requests_.clear();
> + freeQueue_.clear();
>
> delete allocator_;
>
> --
> 2.27.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