libcamera: software_isp: Replace malloc() with std::vector<>
libcamera is implemented in C++, use std::vector<> to manage the dynamically allocated line buffers instead of malloc() and free(). This simplifies the code and improves memory safety by ensuring no allocation will be leaked. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Tested-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
@@ -146,7 +146,7 @@ private:
|
||||
DebayerInputConfig inputConfig_;
|
||||
DebayerOutputConfig outputConfig_;
|
||||
std::unique_ptr<SwStatsCpu> stats_;
|
||||
uint8_t *lineBuffers_[kMaxLineBuffers];
|
||||
std::vector<uint8_t> lineBuffers_[kMaxLineBuffers];
|
||||
unsigned int lineBufferLength_;
|
||||
unsigned int lineBufferPadding_;
|
||||
unsigned int lineBufferIndex_;
|
||||
|
||||
Reference in New Issue
Block a user