X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fwx%2Fcontrols.cc;h=7cd31634dd218792998ffccf4bfb594ad279f82c;hb=54819e695ac39ad62f2633ae10cdcf51adb4d810;hp=3e06664607d8617a158af7fbe74780b3ebb84774;hpb=e14f261a6a0ec1c3047db37ce55655fa095a6b08;p=dcpomatic.git diff --git a/src/wx/controls.cc b/src/wx/controls.cc index 3e0666460..7cd31634d 100644 --- a/src/wx/controls.cc +++ b/src/wx/controls.cc @@ -52,6 +52,7 @@ using boost::optional; using boost::shared_ptr; using boost::weak_ptr; using boost::dynamic_pointer_cast; +using namespace dcpomatic; Controls::Controls (wxWindow* parent, shared_ptr viewer, bool editor_controls) : wxPanel (parent) @@ -208,11 +209,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 (