From 450a79c88168ecb24524c160e110259f75954eeb Mon Sep 17 00:00:00 2001 From: Funami580 Date: Sat, 10 Jul 2021 19:38:54 +0200 Subject: [PATCH] Fix last frame not being played --- src/video_controller.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video_controller.cpp b/src/video_controller.cpp index 6c4427eaf9..7e52248660 100644 --- a/src/video_controller.cpp +++ b/src/video_controller.cpp @@ -159,7 +159,7 @@ void VideoController::PlayLine() { // Round-trip conversion to convert start to exact int startFrame = FrameAtTime(context->selectionController->GetActiveLine()->Start, agi::vfr::START); start_ms = TimeAtFrame(startFrame); - end_frame = FrameAtTime(context->selectionController->GetActiveLine()->End, agi::vfr::END) + 1; + end_frame = FrameAtTime(context->selectionController->GetActiveLine()->End, agi::vfr::END); JumpToFrame(startFrame); @@ -179,7 +179,7 @@ void VideoController::OnPlayTimer(wxTimerEvent &) { int next_frame = FrameAtTime(start_ms + duration_cast(steady_clock::now() - playback_start_time).count()); if (next_frame == frame_n) return; - if (next_frame >= end_frame) + if (next_frame > end_frame) Stop(); else { frame_n = next_frame;