Adding pre-roll to VideoCacheThread, and making video & audio threads wait for the isReady() method before playing. Also fixed an audio bug where our internal buffer was not being cleared on seek. Removed some unused caching from Clip, and did some minor refactor on FrameMapper/Clip cache clearing.

This commit is contained in:
Jonathan Thomas
2022-01-26 17:56:33 -06:00
parent f1c2cc06de
commit 133bae40c3
13 changed files with 137 additions and 87 deletions

View File

@@ -655,24 +655,24 @@ 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);
SWR_FREE(&avr);
avr = NULL;
}
}
// 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);
SWR_FREE(&avr);
avr = NULL;
}
}