mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-23 16:45:07 +03:00
libcamera: framebuffer_allocator: Remove entry if allocation fails
Remove the entry from the `buffers_` mapping if `Camera::exportFrameBuffers()` fails, otherwise there would be a stale entry in the map. Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
ab5816a540
commit
2e2ba223f3
1 changed files with 4 additions and 0 deletions
|
@ -97,6 +97,10 @@ int FrameBufferAllocator::allocate(Stream *stream)
|
|||
LOG(Allocator, Error)
|
||||
<< "Stream is not part of " << camera_->id()
|
||||
<< " active configuration";
|
||||
|
||||
if (ret < 0)
|
||||
buffers_.erase(it);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue