diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-10-16 11:46:36 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-10-16 11:46:36 +0100 |
| commit | e24d0def5b4e6c1825620b032af9f63c9eb78693 (patch) | |
| tree | 1f4ce6093545c9ecc25e227e6ebfc7575810e6b5 /src/wx | |
| parent | 2f460fefd66910a232960b0cf345912f988c82e0 (diff) | |
Optimise the fetch-same-frame case a bit (#196).
Diffstat (limited to 'src/wx')
| -rw-r--r-- | src/wx/film_viewer.cc | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index 69cd276e1..291ab422d 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -135,7 +135,7 @@ FilmViewer::set_film (shared_ptr<Film> f) _player->Changed.connect (boost::bind (&FilmViewer::player_changed, this, _1)); calculate_sizes (); - fetch_current_frame_again (); + fetch_next_frame (); } void @@ -145,17 +145,14 @@ FilmViewer::fetch_current_frame_again () 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. + /* We could do this with a seek and a fetch_next_frame, but this is + a shortcut to make it quicker. */ - Time p = _player->video_position() - _film->video_frames_to_time (1); - if (p < 0) { - p = 0; - } - - _player->seek (p, true); - fetch_next_frame (); + _got_frame = false; + _player->repeat_last_video (); + _panel->Refresh (); + _panel->Update (); } void |
