Remove check on whether the last seek was accurate when re-getting
authorCarl Hetherington <cth@carlh.net>
Sat, 6 Jan 2018 22:51:07 +0000 (22:51 +0000)
committerCarl Hetherington <cth@carlh.net>
Sat, 6 Jan 2018 22:51:07 +0000 (22:51 +0000)
a frame.  This breaks things like changing crop after slidering to
a new position; at this point we don't care that the last seek was
inaccurate: the new one should be so that the frame stays the same.

ChangeLog
src/wx/film_viewer.cc
src/wx/film_viewer.h

index 910a8f145ab39198f31c8e818fe9ccd94d4556b8..4d94b3087207fa99eab20ba4ecef01aaa7eacb6f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2018-01-06  Carl Hetherington  <cth@carlh.net>
 
 2018-01-06  Carl Hetherington  <cth@carlh.net>
 
+       * Fix playhead wandering on some operations (#1112).
+
        * Simplify user interface for managing keys.
 
        * Version 2.11.37 released.
        * Simplify user interface for managing keys.
 
        * Version 2.11.37 released.
index 0fb5058f308b97477ec4e26875ff5287d28782d2..3b6ea5b39fa4f2095ceb2b9275e57eb3ff7df092 100644 (file)
@@ -88,7 +88,6 @@ FilmViewer::FilmViewer (wxWindow* p, bool outline_content, bool jump_to_selected
        , _play_button (new wxToggleButton (this, wxID_ANY, _("Play")))
        , _coalesce_player_changes (false)
        , _pending_player_change (false)
        , _play_button (new wxToggleButton (this, wxID_ANY, _("Play")))
        , _coalesce_player_changes (false)
        , _pending_player_change (false)
-       , _last_seek_accurate (true)
        , _audio (DCPOMATIC_RTAUDIO_API)
        , _audio_channels (0)
        , _audio_block_size (1024)
        , _audio (DCPOMATIC_RTAUDIO_API)
        , _audio_channels (0)
        , _audio_block_size (1024)
@@ -660,7 +659,7 @@ FilmViewer::film_changed (Film::Property p)
 void
 FilmViewer::refresh ()
 {
 void
 FilmViewer::refresh ()
 {
-       seek (_video_position, _last_seek_accurate);
+       seek (_video_position, true);
 }
 
 void
 }
 
 void
@@ -722,7 +721,6 @@ FilmViewer::seek (DCPTime t, bool accurate)
        bool const was_running = stop ();
 
        _butler->seek (t, accurate);
        bool const was_running = stop ();
 
        _butler->seek (t, accurate);
-       _last_seek_accurate = accurate;
        get ();
 
        if (was_running) {
        get ();
 
        if (was_running) {
index 50f7dd2cb2122e3d3446e5e0202dd8ac5b49e6c6..0c71ae1bd387c1e599989ab154e53003d88b75ac 100644 (file)
@@ -132,11 +132,6 @@ private:
        dcp::Size _out_size;
        /** Size of the panel that we have available */
        dcp::Size _panel_size;
        dcp::Size _out_size;
        /** Size of the panel that we have available */
        dcp::Size _panel_size;
-       /** true if the last call to Player::seek() was specified to be accurate;
-        *  this is used so that when re-fetching the current frame we
-        *  can get the same one that we got last time.
-        */
-       bool _last_seek_accurate;
 
        RtAudio _audio;
        int _audio_channels;
 
        RtAudio _audio;
        int _audio_channels;