You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Fixed a memory corruption issue, where AddImage was being called multiple times (at the same time). Added a lock, and I can no longer reproduce the crash.
This commit is contained in:
@@ -676,6 +676,7 @@ void Frame::AddColor(int width, int height, string color)
|
||||
void Frame::AddImage(int width, int height, int bytes_per_pixel, QImage::Format type, const unsigned char *pixels_)
|
||||
{
|
||||
// Create new buffer
|
||||
const GenericScopedLock<CriticalSection> lock(addingImageSection);
|
||||
int buffer_size = width * height * bytes_per_pixel;
|
||||
qbuffer = new unsigned char[buffer_size]();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user