Try to stop crashes when tests are torn down.
[dcpomatic.git] / src / lib / dcp_encoder.cc
index 522f02947ff728c77a487087443e0e72f1c71918..a3708040596c3c3aa9173f5e7e317fc03b094560 100644 (file)
@@ -68,6 +68,14 @@ DCPEncoder::DCPEncoder (shared_ptr<const Film> film, weak_ptr<Job> job)
        }
 }
 
+DCPEncoder::~DCPEncoder ()
+{
+       /* We must stop receiving more video data before we die */
+       _player_video_connection.release ();
+       _player_audio_connection.release ();
+       _player_subtitle_connection.release ();
+}
+
 void
 DCPEncoder::go ()
 {