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:
parent
a2bdff6d0b
commit
30d704732b
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue