diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-03-17 10:56:41 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-03-17 10:56:41 +0000 |
| commit | db6827cee87a7331e2adc91a852d85dc73856f4d (patch) | |
| tree | 4c14f37e190e51e1208a7bdcf5b34e53430eabd3 /src | |
| parent | e47256cdeceb58f60fecc78d272f5971aa2e55ae (diff) | |
Improve behaviour of the position slider at the end of films.
Reported-by: Gérald Maruccia
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/film_viewer.cc | 7 |
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 (); } } |
