Hand-apply bbfb370d7de28ec1e8f307865cc6253bb5d4366e from master; quicker digest calcu...
[dcpomatic.git] / src / tools / dcpomatic_create.cc
index 1b985a918e752dc7d94264f026ce8f37ccda05ba..304f4f697ab6e8a031c44dd2a74c3b896f2c448a 100644 (file)
@@ -74,14 +74,14 @@ main (int argc, char* argv[])
        dcpomatic_setup ();
 
        string name;
-       DCPContentType const * dcp_content_type = DCPContentType::from_dci_name ("TST");
+       DCPContentType const * dcp_content_type = DCPContentType::from_isdcf_name ("TST");
        Ratio const * container_ratio = 0;
        Ratio const * content_ratio = 0;
        int still_length = 10;
        boost::filesystem::path output;
        
        int option_index = 0;
-       while (1) {
+       while (true) {
                static struct option long_options[] = {
                        { "version", no_argument, 0, 'v'},
                        { "help", no_argument, 0, 'h'},
@@ -110,7 +110,7 @@ main (int argc, char* argv[])
                        name = optarg;
                        break;
                case 'c':
-                       dcp_content_type = DCPContentType::from_dci_name (optarg);
+                       dcp_content_type = DCPContentType::from_isdcf_name (optarg);
                        if (dcp_content_type == 0) {
                                cerr << "Bad DCP content type.\n";
                                help (argv[0]);
@@ -182,9 +182,9 @@ main (int argc, char* argv[])
                }
                
                JobManager* jm = JobManager::instance ();
-               while (jm->work_to_do ()) {
-                       ui_signaller->ui_idle ();
-               }
+
+               while (jm->work_to_do ()) {}
+               while (ui_signaller->ui_idle() > 0) {}
 
                ContentList content = film->content ();
                for (ContentList::iterator i = content.begin(); i != content.end(); ++i) {