free cache in FrameMapper::Close()

- this hugely reduces the memory used by rendering a timeline
  with a lot of clips
- could be related to issue #239
This commit is contained in:
Chris Kirmse
2019-05-30 09:40:18 -07:00
parent 42af4ca8ca
commit 25e51d815e

View File

@@ -651,6 +651,16 @@ void FrameMapper::Close()
// Close internal reader
reader->Close();
// Clear the fields & frames lists
fields.clear();
frames.clear();
// Mark as dirty
is_dirty = true;
// Clear cache
final_cache.Clear();
// Deallocate resample buffer
if (avr) {
SWR_CLOSE(avr);