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.
This commit is contained in:
Javier Martinez Canillas 2021-09-21 14:44:18 +02:00
parent 21c412dc49
commit ce9f75abaa
No known key found for this signature in database
GPG key ID: C751E590D63F3D69

View file

@ -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;
}