summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wx/film_viewer.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc
index 45372d811..ce5eab00e 100644
--- a/src/wx/film_viewer.cc
+++ b/src/wx/film_viewer.cc
@@ -219,7 +219,12 @@ void
FilmViewer::slider_moved ()
{
if (_film && _player) {
- _player->seek (_slider->GetValue() * _film->length() / 4096, false);
+ 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 (t, false);
fetch_next_frame ();
}
}