From: Carl Hetherington Date: Mon, 25 Nov 2019 23:33:46 +0000 (+0100) Subject: Some simple-video-view tidy-ups. X-Git-Tag: v2.15.40^2~2 X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=c967096b5061e4bbb3a275d4daf04a2b9c084468 Some simple-video-view tidy-ups. --- diff --git a/src/wx/simple_video_view.cc b/src/wx/simple_video_view.cc index e349b865c..ae13fe1bc 100644 --- a/src/wx/simple_video_view.cc +++ b/src/wx/simple_video_view.cc @@ -85,10 +85,10 @@ SimpleVideoView::paint () #ifdef DCPOMATIC_VARIANT_SWAROOP DCPTime const period = DCPTime::from_seconds(Config::instance()->player_watermark_period() * 60); - int64_t n = _viewer->position().get() / period.get(); + int64_t n = position().get() / period.get(); DCPTime from(n * period.get()); DCPTime to = from + DCPTime::from_seconds(Config::instance()->player_watermark_duration() / 1000.0); - if (from <= _viewer->position() && _viewer->position() <= to) { + if (from <= position() && position() <= to) { if (!_in_watermark) { _in_watermark = true; _watermark_x = rand() % panel_size.GetWidth(); @@ -150,11 +150,10 @@ SimpleVideoView::timer () } display_next_frame (false); - DCPTime const next = _viewer->position() + _viewer->one_video_frame(); + DCPTime const next = position() + _viewer->one_video_frame(); if (next >= length()) { - _viewer->stop (); - _viewer->Finished (); + _viewer->finished (); return; }