From b1589146e73ad97d3f29e9d5cafe61e5424796a4 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 26 Nov 2019 00:37:42 +0100 Subject: [PATCH] Some comments. --- src/wx/film_viewer.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index 3a593fc55..9c3a9c81e 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -322,6 +322,9 @@ FilmViewer::start () 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 (); @@ -468,8 +471,14 @@ FilmViewer::seek (DCPTime t, bool accurate) _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 { + /* We're going to start playing again straight away + so wait for the seek to finish. + */ while (!_video_view->display_next_frame(false)) {} } -- 2.30.2