Use uchardet to guess encoding of subtitle files and reject non-UTF-8.
[dcpomatic.git] / src / lib / server.cc
index 2fc9404669724c41ada2cd80391d121e57609b12..c1db1e6ac866d632c62aead5cd71986875a13151 100644 (file)
@@ -23,6 +23,7 @@
  */
 
 #include "server.h"
+#include "util.h"
 #include "dcpomatic_socket.h"
 #include "image.h"
 #include "dcp_video.h"
@@ -33,7 +34,9 @@
 #include "safe_stringstream.h"
 #include "raw_convert.h"
 #include "compose.hpp"
+#include "log.h"
 #include <libcxml/cxml.h>
+#include <libxml++/libxml++.h>
 #include <boost/algorithm/string.hpp>
 #include <boost/scoped_array.hpp>
 #include <string>
@@ -75,6 +78,7 @@ Server::~Server ()
                boost::mutex::scoped_lock lm (_worker_mutex);
                _terminate = true;
                _empty_condition.notify_all ();
+               _full_condition.notify_all ();
        }
 
        for (vector<boost::thread*>::iterator i = _worker_threads.begin(); i != _worker_threads.end(); ++i) {