pipeline: raspberrypi: Do not unconditionally free buffers on close

When a camera is terminated, do not unconditionally free buffers in the
RPiCameraData destructor. Otherwise, this causes harmless error log messages
to be displayed if no buffer have previously been allocated.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Tested-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Naushir Patuck 2022-10-28 14:51:10 +01:00 committed by Kieran Bingham
parent a2bdff6d0b
commit 30d704732b

View file

@ -1506,6 +1506,9 @@ void PipelineHandlerRPi::mapBuffers(Camera *camera, const RPi::BufferMap &buffer
void RPiCameraData::freeBuffers()
{
if (!buffersAllocated_)
return;
if (ipa_) {
/*
* Copy the buffer ids from the unordered_set to a vector to