From 37380658bbec3481df344f588c3c1fb5ab86f1f8 Mon Sep 17 00:00:00 2001 From: wangqr Date: Thu, 9 May 2019 16:48:15 -0400 Subject: [PATCH] Fix errors in AlignToVideo * Call TimeAtFrame with correct parameter * Fix syntax error --- src/dialog_align.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dialog_align.cpp b/src/dialog_align.cpp index 004408bfa..5243d2197 100644 --- a/src/dialog_align.cpp +++ b/src/dialog_align.cpp @@ -281,7 +281,7 @@ namespace { return; } int x = int(lx), y = int(ly); - unsigned char tolerance = unsigned char(lt); + unsigned char tolerance = (unsigned char)(lt); auto color = selected_color->GetColor(); auto r = color.r; @@ -323,8 +323,8 @@ namespace { auto timecode = context->project->Timecodes(); auto line = context->selectionController->GetActiveLine(); - line->Start = timecode.TimeAtFrame(left); - line->End = timecode.TimeAtFrame(right + 1); // exclusive + line->Start = timecode.TimeAtFrame(left, agi::vfr::Time::START); + line->End = timecode.TimeAtFrame(right, agi::vfr::Time::END); // exclusive context->ass->Commit(_("Align to video by key point"), AssFile::COMMIT_DIAG_TIME); Close(); }