From ce9f75abaaa3c43109516493254c25f624e7a7fc Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Tue, 21 Sep 2021 14:44:18 +0200 Subject: [PATCH] libcamera: free the FrameBufferAllocator buffers before deleting it The libcamera application developer guide mentions that buffers allocated by the FrameBufferAllocator must be explicitly freed before deleting it. --- spa/plugins/libcamera/libcamera_wrapper.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/spa/plugins/libcamera/libcamera_wrapper.cpp b/spa/plugins/libcamera/libcamera_wrapper.cpp index 037058af0..4e0a461c8 100644 --- a/spa/plugins/libcamera/libcamera_wrapper.cpp +++ b/spa/plugins/libcamera/libcamera_wrapper.cpp @@ -532,6 +532,7 @@ extern "C" { spa_log_info(this->log_, "Stopping camera ..."); this->cam_->stop(); if(this->allocator_) { + this->allocator_->free(stream); delete this->allocator_; this->allocator_ = nullptr; }