Some comments.
authorCarl Hetherington <cth@carlh.net>
Mon, 25 Nov 2019 23:37:42 +0000 (00:37 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 8 Jan 2020 20:56:47 +0000 (21:56 +0100)
src/wx/film_viewer.cc

index 3a593fc556b80cd1babfba5a6dcd5c69b272a07f..9c3a9c81e0ca8d5b11a10c4ac7cbda386b655c73 100644 (file)
@@ -322,6 +322,9 @@ FilmViewer::start ()
                idle_handler ();
        }
 
                idle_handler ();
        }
 
+       /* Take the video view's idea of position as our `playhead' and start the
+          audio stream (which is the timing reference) there.
+         */
        if (_audio.isStreamOpen()) {
                _audio.setStreamTime (_video_view->position().seconds());
                _audio.startStream ();
        if (_audio.isStreamOpen()) {
                _audio.setStreamTime (_video_view->position().seconds());
                _audio.startStream ();
@@ -468,8 +471,14 @@ FilmViewer::seek (DCPTime t, bool accurate)
        _butler->seek (t, accurate);
 
        if (!_playing) {
        _butler->seek (t, accurate);
 
        if (!_playing) {
+               /* We're not playing, so let the GUI thread get on and
+                  come back later to get the next frame after the seek.
+               */
                request_idle_display_next_frame ();
        } else {
                request_idle_display_next_frame ();
        } else {
+               /* We're going to start playing again straight away
+                  so wait for the seek to finish.
+               */
                while (!_video_view->display_next_frame(false)) {}
        }
 
                while (!_video_view->display_next_frame(false)) {}
        }