mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-19 18:35:07 +03:00
qcam: Clear the pool of free requests upon stopCapture()
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: c753223ad6
("libcamera, android, cam, gstreamer, qcam, v4l2: Reuse Request")
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Tested-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
This commit is contained in:
parent
abf5641641
commit
2d50b16645
1 changed files with 1 additions and 0 deletions
|
@ -579,6 +579,7 @@ void MainWindow::stopCapture()
|
|||
mappedBuffers_.clear();
|
||||
|
||||
requests_.clear();
|
||||
freeQueue_.clear();
|
||||
|
||||
delete allocator_;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue