From 8864bea8e94a2e237ca0aa5db6338d455a72b015 Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Tue, 1 Mar 2022 13:00:53 -0600 Subject: [PATCH] Renaming variable for clarity --- src/Qt/VideoCacheThread.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Qt/VideoCacheThread.cpp b/src/Qt/VideoCacheThread.cpp index 02e0d40d..e58c52cc 100644 --- a/src/Qt/VideoCacheThread.cpp +++ b/src/Qt/VideoCacheThread.cpp @@ -74,7 +74,7 @@ namespace openshot // Types for storing time durations in whole and fractional microseconds using micro_sec = std::chrono::microseconds; using double_micro_sec = std::chrono::duration; - bool should_pause = false; + bool should_pause_cache = false; while (!threadShouldExit() && is_playing) { // Calculate on-screen time for a single frame @@ -84,7 +84,7 @@ namespace openshot // Calculate increment (based on speed) // Support caching in both directions int16_t increment = speed; - if (current_speed == 0 && should_pause) { + if (current_speed == 0 && should_pause_cache) { // Sleep during pause (after caching additional frames when paused) std::this_thread::sleep_for(frame_duration / 4); continue; @@ -92,7 +92,7 @@ namespace openshot } else if (current_speed == 0) { // Allow 'max frames' to increase when pause is detected (based on cache) // To allow the cache to fill-up only on the initial pause. - should_pause = true; + should_pause_cache = true; // Calculate bytes per frame. If we have a reference openshot::Frame, use that instead (the preview // window can be smaller, can thus reduce the bytes per frame) @@ -123,7 +123,7 @@ namespace openshot } else { // Default max frames ahead (normal playback) max_frames_ahead = 8; - should_pause = false; + should_pause_cache = false; } // Always cache frames from the current display position to our maximum (based on the cache size).