fix a number of memory leaks

- some were with libav functions
- same were due to non-virtual destructors
This commit is contained in:
Chris Kirmse
2019-05-08 14:53:23 -07:00
parent 17a2258939
commit 833fcb8e8e
20 changed files with 63 additions and 30 deletions

View File

@@ -70,6 +70,11 @@ Timeline::Timeline(int width, int height, Fraction fps, int sample_rate, int cha
final_cache->SetMaxBytesFromInfo(OPEN_MP_NUM_PROCESSORS * 2, info.width, info.height, info.sample_rate, info.channels);
}
Timeline::~Timeline() {
delete final_cache;
final_cache = NULL;
}
// Add an openshot::Clip to the timeline
void Timeline::AddClip(Clip* clip)
{
@@ -1481,4 +1486,4 @@ void Timeline::SetMaxSize(int width, int height) {
// Set max size
Settings::Instance()->MAX_WIDTH = display_ratio_size.width();
Settings::Instance()->MAX_HEIGHT = display_ratio_size.height();
}
}