Improving cache performance by preventing the cache from getting behind the currently displaying frame #

This commit is contained in:
Jonathan Thomas
2018-12-14 14:38:33 -06:00
parent 31e9e7b656
commit 4ed7847fa9
2 changed files with 7 additions and 1 deletions

View File

@@ -102,6 +102,12 @@ namespace openshot
// Ignore out of bounds frame exceptions
}
// Is cache position behind current display frame?
if (position < current_display_frame) {
// Jump ahead
position = current_display_frame;
}
// Increment frame number
position++;
}