From: Carl Hetherington Date: Wed, 17 Mar 2021 15:35:11 +0000 (+0100) Subject: When correcting markers keep them just inside the project's duration. X-Git-Tag: v2.15.136~16 X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=9911663f3edd47eddde43b00d20f7b718bac786b When correcting markers keep them just inside the project's duration. --- diff --git a/src/wx/markers_dialog.cc b/src/wx/markers_dialog.cc index 11a76548e..6658fdb45 100644 --- a/src/wx/markers_dialog.cc +++ b/src/wx/markers_dialog.cc @@ -91,10 +91,11 @@ private: { auto f = film.lock (); DCPOMATIC_ASSERT (f); - auto tc = timecode->get(f->video_frame_rate()); + auto vfr = f->video_frame_rate(); + auto tc = timecode->get(vfr); if (tc >= f->length()) { - tc = f->length(); - timecode->set (tc, f->video_frame_rate()); + tc = f->length() - DCPTime::from_frames(1, vfr); + timecode->set (tc, vfr); } if (checkbox->GetValue()) { f->set_marker (type, tc);