Set up streams after changing content, otherwise we are anticipating things that...
authorCarl Hetherington <cth@carlh.net>
Mon, 25 Feb 2013 00:19:06 +0000 (00:19 +0000)
committerCarl Hetherington <cth@carlh.net>
Mon, 25 Feb 2013 00:19:06 +0000 (00:19 +0000)
src/lib/film.cc

index fb3fb4cde320a89dfca7bcf6bb991fbc307415c0..f36614689c64a23d9bc65f09083fd2a2a91f27ba 100644 (file)
@@ -899,6 +899,13 @@ Film::set_content (string c)
                        set_content_audio_streams (d.audio->audio_streams ());
                }
 
+               {
+                       boost::mutex::scoped_lock lm (_state_mutex);
+                       _content = c;
+               }
+               
+               signal_changed (CONTENT);
+               
                /* Start off with the first audio and subtitle streams */
                if (d.audio && !d.audio->audio_streams().empty()) {
                        set_content_audio_stream (d.audio->audio_streams().front());
@@ -908,13 +915,6 @@ Film::set_content (string c)
                        set_subtitle_stream (d.video->subtitle_streams().front());
                }
                
-               {
-                       boost::mutex::scoped_lock lm (_state_mutex);
-                       _content = c;
-               }
-               
-               signal_changed (CONTENT);
-               
                examine_content ();
 
        } catch (...) {