Fix deadlock.
authorCarl Hetherington <cth@carlh.net>
Sun, 4 Oct 2015 21:30:16 +0000 (22:30 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 4 Oct 2015 21:30:16 +0000 (22:30 +0100)
src/lib/dcp_subtitle_content.cc

index 440b10a196922ba2dec736d17cd29d3fd4441dc9..19f38c5f64732fd230c0dfa713ea968aa3e846aa 100644 (file)
@@ -123,9 +123,11 @@ DCPSubtitleContent::set_subtitle_video_frame_rate (int r)
 double
 DCPSubtitleContent::subtitle_video_frame_rate () const
 {
-       boost::mutex::scoped_lock lm (_mutex);
-       if (_frame_rate) {
-               return _frame_rate.get ();
+       {
+               boost::mutex::scoped_lock lm (_mutex);
+               if (_frame_rate) {
+                       return _frame_rate.get ();
+               }
        }
 
        /* No frame rate specified, so assume this content has been