Calm a busy-wait in dcpomatic_create.
authorCarl Hetherington <cth@carlh.net>
Fri, 11 Nov 2016 21:16:51 +0000 (21:16 +0000)
committerCarl Hetherington <cth@carlh.net>
Fri, 11 Nov 2016 21:16:51 +0000 (21:16 +0000)
src/tools/dcpomatic_create.cc

index a3adc8e3e32312567c5bd0411abeba232ec05ac7..c14522a02ed50c77ffdd15c8346842f22843d8ed 100644 (file)
@@ -29,6 +29,7 @@
 #include "lib/ratio.h"
 #include "lib/image_content.h"
 #include "lib/video_content.h"
+#include "lib/cross.h"
 #include <libxml++/libxml++.h>
 #include <boost/filesystem.hpp>
 #include <getopt.h>
@@ -235,7 +236,10 @@ main (int argc, char* argv[])
 
                JobManager* jm = JobManager::instance ();
 
-               while (jm->work_to_do ()) {}
+               while (jm->work_to_do ()) {
+                       dcpomatic_sleep (1);
+               }
+
                while (signal_manager->ui_idle() > 0) {}
 
                ContentList content = film->content ();