diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-07-28 16:57:39 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-07-28 16:57:39 +0100 |
| commit | 2da067ce01a04964dd5d739ea695504517877507 (patch) | |
| tree | 2db3cb29f363c8958e48a1e1018635a77c7cd599 /src | |
| parent | c41a10952ef0f9988a16830dc1cf940cce0e91e3 (diff) | |
Check for end of film when doing forward-frame.
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 6f29bcc33..1badc0282 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -418,7 +418,12 @@ FilmViewer::back_clicked () void FilmViewer::forward_clicked () { - get (_position + DCPTime::from_frames (1, _film->video_frame_rate ()), true); + DCPTime p = _position + DCPTime::from_frames (1, _film->video_frame_rate ()); + if (p >= _film->length ()) { + p = _position; + } + + get (p, true); update_position_label (); update_position_slider (); } |
