diff options
Diffstat (limited to 'src/wx/film_viewer.cc')
| -rw-r--r-- | src/wx/film_viewer.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index 7e1b61811..b0bc65750 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -222,6 +222,11 @@ FilmViewer::slider_moved () { if (_film && _player) { try { + Time t = _slider->GetValue() * _film->length() / 4096; + /* Ensure that we hit the end of the film at the end of the slider */ + if (t >= _film->length ()) { + t = _film->length() - _film->video_frames_to_time (1); + } _player->seek (DCPTime (_film->length().get() * _slider->GetValue() / 4096), false); fetch_next_frame (); } catch (OpenFileError& e) { |
