Emit no audio from DCPs if none is mapped
[dcpomatic.git] / src / tools / dcpomatic_server_cli.cc
index 6dca8064c77163a730c8aa6b4846f6fe140a2e7b..6d7f6aba729ae06113de78f76ae9bbd5ab8dba68 100644 (file)
@@ -28,6 +28,7 @@
 #include "lib/null_log.h"
 #include "lib/version.h"
 #include "lib/encode_server.h"
+#include "lib/dcpomatic_log.h"
 #include <boost/array.hpp>
 #include <boost/asio.hpp>
 #include <boost/algorithm/string.hpp>
@@ -45,7 +46,7 @@
 using std::cerr;
 using std::string;
 using std::cout;
-using boost::shared_ptr;
+using std::shared_ptr;
 
 static void
 help (string n)
@@ -104,14 +105,11 @@ main (int argc, char* argv[])
                }
        }
 
-       shared_ptr<Log> log;
        if (write_log) {
-               log.reset (new FileLog ("dcpomatic_server_cli.log"));
-       } else {
-               log.reset (new NullLog);
+               dcpomatic_log.reset (new FileLog("dcpomatic_server_cli.log"));
        }
 
-       EncodeServer server (log, verbose, num_threads);
+       EncodeServer server (verbose, num_threads);
 
        try {
                server.run ();