diff options
author | Naushir Patuck <naush@raspberrypi.com> | 2022-10-28 14:51:10 +0100 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2022-10-28 15:27:23 +0100 |
commit | 30d704732badc675f72fe73d14749669cb645c23 (patch) | |
tree | 5d4e023b0cebd2f506d52a1813c179509e07d20f /src | |
parent | a2bdff6d0b67475492ac7cf9318866b6d89a28fd (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index 343f8cb2..1b599fcc 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -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 |