From 0a5de051937ad3999dea70d80bcc4215083b8694 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 8 Aug 2013 20:51:02 +0100 Subject: Prevent frame back before time 0. --- src/wx/film_viewer.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index f569f4c54..ddd6c12c5 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -382,8 +382,13 @@ FilmViewer::back_clicked () /* Player::video_position is the time after the last frame that we received. We want to see the one before it, so we need to go back 2. */ + + Time p = _player->video_position() - _film->video_frames_to_time (2); + if (p < 0) { + p = 0; + } - _player->seek (_player->video_position() - _film->video_frames_to_time(2), true); + _player->seek (p, true); fetch_next_frame (); } -- cgit v1.2.3