summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-03-17 16:35:11 +0100
committerCarl Hetherington <cth@carlh.net>2021-03-17 16:35:11 +0100
commit9911663f3edd47eddde43b00d20f7b718bac786b (patch)
treef8f2c2f99563262be41540790dd77f0365e202dc /src
parentcdb95926a42948144dad16c227e9cc01a00d49b8 (diff)
When correcting markers keep them just inside the project's duration.
Diffstat (limited to 'src')
-rw-r--r--src/wx/markers_dialog.cc7
1 files changed, 4 insertions, 3 deletions
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);