diff --git a/src/async_video_provider.cpp b/src/async_video_provider.cpp index 297bda7e0..d184c1d00 100644 --- a/src/async_video_provider.cpp +++ b/src/async_video_provider.cpp @@ -111,7 +111,7 @@ void AsyncVideoProvider::LoadSubtitles(const AssFile *new_subs) throw() { worker->Async([=]{ subs.reset(copy); single_frame = NEW_SUBS_FILE; - ProcAsync(req_version); + ProcAsync(req_version, false); }); } @@ -135,7 +135,7 @@ void AsyncVideoProvider::UpdateSubtitles(const AssFile *new_subs, std::setAsync([=]{ time = new_time; frame_number = new_frame; - ProcAsync(req_version); + ProcAsync(req_version, false); }); } @@ -178,7 +178,7 @@ bool AsyncVideoProvider::NeedUpdate(std::vector const& v return false; } -void AsyncVideoProvider::ProcAsync(uint_fast32_t req_version) { +void AsyncVideoProvider::ProcAsync(uint_fast32_t req_version, bool check_updated) { // Only actually produce the frame if there's no queued changes waiting if (req_version < version || frame_number < 0) return; @@ -188,7 +188,7 @@ void AsyncVideoProvider::ProcAsync(uint_fast32_t req_version) { visible_lines.push_back(&line); } - if (!NeedUpdate(visible_lines)) return; + if (check_updated && !NeedUpdate(visible_lines)) return; last_lines.clear(); last_lines.reserve(visible_lines.size()); diff --git a/src/async_video_provider.h b/src/async_video_provider.h index b1193026d..139f7bc2a 100644 --- a/src/async_video_provider.h +++ b/src/async_video_provider.h @@ -70,7 +70,7 @@ class AsyncVideoProvider { std::shared_ptr ProcFrame(int frame, double time, bool raw = false); /// Produce a frame if req_version is still the current version - void ProcAsync(uint_fast32_t req_version); + void ProcAsync(uint_fast32_t req_version, bool check_updated); /// Monotonic counter used to drop frames when changes arrive faster than /// they can be rendered