From d5c8fb9b826aaac2acab58f8a7b2eec4fcce99a6 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 2 Apr 2019 00:58:53 +0100 Subject: [PATCH 1/1] Try to fix strange behaviour of the preview slider towards the end of content where there is a section at the end with no keyframe (#1522). --- src/wx/controls.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/wx/controls.cc b/src/wx/controls.cc index 3e0666460..473ad8cb3 100644 --- a/src/wx/controls.cc +++ b/src/wx/controls.cc @@ -208,11 +208,15 @@ Controls::slider_moved (bool page) DCPTime t (_slider->GetValue() * _film->length().get() / 4096); t = t.round (_film->video_frame_rate()); - /* Ensure that we hit the end of the film at the end of the slider */ + /* Ensure that we hit the end of the film at the end of the slider. In particular, we + need to do an accurate seek in case there isn't a keyframe near the end. + */ + bool accurate = false; if (t >= _film->length ()) { t = _film->length() - _viewer->one_video_frame(); + accurate = true; } - _viewer->seek (t, false); + _viewer->seek (t, accurate); update_position_label (); log ( -- 2.30.2