Stop old versions of DCP-o-matic loading new state files. Fix missing content type...
authorCarl Hetherington <cth@carlh.net>
Tue, 4 Mar 2014 21:25:44 +0000 (21:25 +0000)
committerCarl Hetherington <cth@carlh.net>
Tue, 4 Mar 2014 21:25:44 +0000 (21:25 +0000)
src/lib/film.cc
src/tools/dcpomatic_create.cc

index 00beb870f6e0ead188a1c013cc4f32b23e8594bb..1b724b27edc025d60c549c9e5e2ad1b6ca54a605 100644 (file)
@@ -397,6 +397,9 @@ Film::read_metadata ()
        f.read_file (file ("metadata.xml"));
 
        _state_version = f.number_child<int> ("Version");
+       if (_state_version > current_state_version) {
+               throw StringError (_("This film was created with a newer version of DCP-o-matic, and it cannot be loaded into this version.  Sorry!"));
+       }
        
        _name = f.string_child ("Name");
        _use_dci_name = f.bool_child ("UseDCIName");
index 4f737dd5a53eafbefa0dd2d2d030fb9e6e03377e..a079a95cbe4e43f6164193cb4a603fcf2bb1b203 100644 (file)
@@ -150,6 +150,7 @@ main (int argc, char* argv[])
                }
 
                film->set_container (container_ratio);
+               film->set_dcp_content_type (dcp_content_type);
                
                for (int i = optind; i < argc; ++i) {
                        shared_ptr<Content> c = content_factory (film, argv[i]);