Use libdcp's compress_j2k; move Data into libdcp.
[dcpomatic.git] / src / lib / writer.cc
index 17bd21daf6cb61b0bef42cd6c0167a5166f33aad..2a9b6d6d7414a5752dab0cd78f38fa8c6ff6e090 100644 (file)
@@ -30,7 +30,6 @@
 #include "cross.h"
 #include "audio_buffers.h"
 #include "md5_digester.h"
-#include "data.h"
 #include "version.h"
 #include "font.h"
 #include "util.h"
@@ -62,6 +61,7 @@ using std::cout;
 using boost::shared_ptr;
 using boost::weak_ptr;
 using boost::dynamic_pointer_cast;
+using dcp::Data;
 
 Writer::Writer (shared_ptr<const Film> film, weak_ptr<Job> j)
        : _film (film)
@@ -429,8 +429,10 @@ Writer::terminate_thread (bool can_throw)
        _full_condition.notify_all ();
        lock.unlock ();
 
-       DCPOMATIC_ASSERT (_thread->joinable ());
-       _thread->join ();
+       if (_thread->joinable ()) {
+               _thread->join ();
+       }
+
        if (can_throw) {
                rethrow ();
        }