projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fbf42d7
)
Prevent frame back before time 0.
author
Carl Hetherington
<cth@carlh.net>
Thu, 8 Aug 2013 19:51:02 +0000
(20:51 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Thu, 8 Aug 2013 19:51:02 +0000
(20:51 +0100)
src/wx/film_viewer.cc
patch
|
blob
|
history
diff --git
a/src/wx/film_viewer.cc
b/src/wx/film_viewer.cc
index f569f4c54ae097a43c893cccff62f09689cfaeca..ddd6c12c569e8c9ed46706aa81e4108a5a256d32 100644
(file)
--- 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 ();
}