Protect cross-thread access to _pending_images.
[dcpomatic.git] / src / lib / encode_server.h
index 00a1b6b12b0e65abcbf850007669d0767ea0e826..14dc77398a660b730258974cc7b3fee8f9f2d74e 100644 (file)
@@ -42,7 +42,7 @@ class Log;
 class EncodeServer : public Server, public ExceptionStore
 {
 public:
-       EncodeServer (boost::shared_ptr<Log> log, bool verbose, int num_threads);
+       EncodeServer (bool verbose, int num_threads);
        ~EncodeServer ();
 
        void run ();
@@ -58,7 +58,6 @@ private:
        std::list<boost::shared_ptr<Socket> > _queue;
        boost::condition _full_condition;
        boost::condition _empty_condition;
-       boost::shared_ptr<Log> _log;
        bool _verbose;
        int _num_threads;
 
@@ -69,6 +68,7 @@ private:
                        , socket (0)
                {}
 
+               boost::mutex mutex;
                boost::thread* thread;
                boost::asio::ip::udp::socket* socket;
                char buffer[64];