summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-10-05 21:27:58 +0200
committerCarl Hetherington <cth@carlh.net>2019-10-05 21:27:58 +0200
commit2155a17fb217fc511495ed50e39e385965f6ccd3 (patch)
tree88649343488f0261cb2635e956a1518db0f0cad1 /src
parentaecb5f5a8f65f1d0f50b5861497c067adcd1f0d0 (diff)
parent5b1c0d804847978e32bc4ce4de43f148c366f9da (diff)
Merge branch 'master' of ssh://git.carlh.net/home/carl/git/dcpomatic
Diffstat (limited to 'src')
-rw-r--r--src/lib/player.cc6
-rw-r--r--src/wx/timing_panel.cc4
2 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index 38c4beaae..cc8556f3d 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -636,7 +636,11 @@ Player::pass ()
/* Sometimes the thing that happened last finishes fractionally before
or after this silence. Bodge the start time of the silence to fix it.
*/
- DCPOMATIC_ASSERT (labs(period.from.get() - _last_audio_time->get()) < 2);
+ int64_t const error = labs(period.from.get() - _last_audio_time->get());
+ if (error >= 2) {
+ _film->log()->log(String::compose("Silence starting before or after last audio by %1", error), LogEntry::TYPE_ERROR);
+ }
+ DCPOMATIC_ASSERT (error < 2);
period.from = *_last_audio_time;
}
if (period.duration() > one_video_frame()) {
diff --git a/src/wx/timing_panel.cc b/src/wx/timing_panel.cc
index f10815ca4..d3bdc923d 100644
--- a/src/wx/timing_panel.cc
+++ b/src/wx/timing_panel.cc
@@ -404,7 +404,6 @@ TimingPanel::trim_start_changed ()
optional<FrameRateChange> ref_frc;
optional<DCPTime> ref_ph;
- ContentTime const trim = _trim_start->get (_parent->film()->video_frame_rate ());
BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
if (i->position() <= ph && ph < i->end(_parent->film())) {
@@ -417,6 +416,7 @@ TimingPanel::trim_start_changed ()
ref_ph = ph - i->position() + DCPTime (i->trim_start(), ref_frc.get());
}
+ ContentTime const trim = _trim_start->get (i->video_frame_rate().get_value_or(_parent->film()->video_frame_rate()));
i->set_trim_start (trim);
}
@@ -437,8 +437,8 @@ TimingPanel::trim_end_changed ()
fv->set_coalesce_player_changes (true);
- ContentTime const trim = _trim_end->get (_parent->film()->video_frame_rate ());
BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
+ ContentTime const trim = _trim_end->get (i->video_frame_rate().get_value_or(_parent->film()->video_frame_rate()));
i->set_trim_end (trim);
}