diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-08-08 20:51:02 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-08-08 20:51:02 +0100 |
| commit | 0a5de051937ad3999dea70d80bcc4215083b8694 (patch) | |
| tree | a5a976d5e66ddff26432a18bf2482f4f92e75631 /src | |
| parent | fbf42d70880f5bcba52f3cb53d78ee561efa6fc4 (diff) | |
Prevent frame back before time 0.
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 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 (); } |
