Merge pull request #610 from OpenShot/revert-caching-fix

Revert cache-busting-on-seek Experiment
This commit is contained in:
Jonathan Thomas
2020-12-31 18:22:29 -06:00
committed by GitHub

View File

@@ -725,15 +725,6 @@ std::shared_ptr<Frame> Timeline::GetFrame(int64_t requested_frame)
return frame;
}
// Check if previous frame was cached? (if not, assume we are seeking somewhere else on the Timeline, and need
// to clear all cache (for continuity sake). For example, jumping back to a previous spot can cause issues with audio
// data where the new jump location doesn't match up with the previously cached audio data.
std::shared_ptr<Frame> previous_frame = final_cache->GetFrame(requested_frame - 1);
if (!previous_frame) {
// Seeking to new place on timeline (destroy cache)
ClearAllCache();
}
// Minimum number of frames to process (for performance reasons)
int minimum_frames = OPEN_MP_NUM_PROCESSORS;