summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-07-13 13:26:43 +0100
committerCarl Hetherington <cth@carlh.net>2013-07-13 13:26:43 +0100
commitf29d652722730cb8d65ce41b36f0053ca0477951 (patch)
tree92b8aaf2756c70a63be4a76e9d00bf05bcf1d20b /src
parent1e99bbf5062904095e5fb304271247eb78324016 (diff)
More attempts to nail down seek.
Diffstat (limited to 'src')
-rw-r--r--src/wx/film_viewer.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc
index 819949f1e..b50cb7451 100644
--- a/src/wx/film_viewer.cc
+++ b/src/wx/film_viewer.cc
@@ -141,8 +141,12 @@ FilmViewer::fetch_current_frame_again ()
if (!_player) {
return;
}
+
+ /* Player::video_position is the time after the last frame that we received.
+ We want to see it again, so seek back one frame.
+ */
- _player->seek (_player->video_position(), true);
+ _player->seek (_player->video_position() - _film->video_frames_to_time(1), true);
fetch_next_frame ();
}
@@ -349,7 +353,11 @@ FilmViewer::back_clicked (wxCommandEvent &)
return;
}
- _player->seek (_player->video_position() - _film->video_frames_to_time(1), true);
+ /* 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.
+ */
+
+ _player->seek (_player->video_position() - _film->video_frames_to_time(2), true);
fetch_next_frame ();
}