Prevent extra frame skip on setting up new video (#147).
authorCarl Hetherington <cth@carlh.net>
Thu, 30 May 2013 11:53:33 +0000 (12:53 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 30 May 2013 11:53:33 +0000 (12:53 +0100)
src/wx/film_viewer.cc

index 79642af9c72ee9c3979cc29302bbbd35f1ef34ef..a5920b4bb0f3c2a5ddad552532d3b574f136a9dd 100644 (file)
@@ -132,9 +132,9 @@ FilmViewer::film_changed (Film::Property p)
                if (_decoders.video == 0) {
                        break;
                }
+               _decoders.video->set_subtitle_stream (_film->subtitle_stream());
                _decoders.video->Video.connect (bind (&FilmViewer::process_video, this, _1, _2, _3, _4));
                _decoders.video->OutputChanged.connect (boost::bind (&FilmViewer::decoder_changed, this));
-               _decoders.video->set_subtitle_stream (_film->subtitle_stream());
                calculate_sizes ();
                get_frame ();
                _panel->Refresh ();
@@ -436,7 +436,7 @@ FilmViewer::get_frame ()
                _display_frame.reset ();
                return;
        }
-       
+
        try {
                _got_frame = false;
                while (!_got_frame) {