From c967096b5061e4bbb3a275d4daf04a2b9c084468 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 26 Nov 2019 00:33:46 +0100 Subject: [PATCH] Some simple-video-view tidy-ups. --- src/wx/simple_video_view.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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; } -- 2.30.2