Fix sleep time calculation to change when the project profile is changed (big bug), and add some additional logging/debugging statements

This commit is contained in:
Jonathan Thomas
2021-12-03 15:21:11 -06:00
parent 4a52941708
commit 09bcf2ab15
2 changed files with 8 additions and 6 deletions

View File

@@ -77,10 +77,9 @@ namespace openshot
using ms = std::chrono::milliseconds;
using double_ms = std::chrono::duration<double, ms::period>;
// Calculate on-screen time for a single frame in milliseconds
const auto frame_duration = double_ms(1000.0 / reader->info.fps.ToDouble());
while (!threadShouldExit() && is_playing) {
// Calculate on-screen time for a single frame in milliseconds
const auto frame_duration = double_ms(1000.0 / reader->info.fps.ToDouble());
// Cache frames before the other threads need them
// Cache frames up to the max frames. Reset to current position