Make Config::read() fallback match Config::set_defaults() for
authorCarl Hetherington <cth@carlh.net>
Tue, 13 Feb 2018 01:08:14 +0000 (01:08 +0000)
committerCarl Hetherington <cth@carlh.net>
Tue, 13 Feb 2018 01:08:14 +0000 (01:08 +0000)
_default_dcp_content_type.

src/lib/config.cc

index 16df3779f1f11b36fd11b0af4ec5ba2dbe2fef73..503ca9c5f30f14e26ad209a62151b2ff81362202 100644 (file)
@@ -253,11 +253,7 @@ try
                _default_scale_to = Ratio::from_id (c.get ());
        }
 
-       c = f.optional_string_child ("DefaultDCPContentType");
-       if (c) {
-               _default_dcp_content_type = DCPContentType::from_isdcf_name (c.get ());
-       }
-
+       _default_dcp_content_type = DCPContentType::from_isdcf_name(f.optional_string_child("DefaultDCPContentType").get_value_or("FTR"));
        _default_dcp_audio_channels = f.optional_number_child<int>("DefaultDCPAudioChannels").get_value_or (6);
 
        if (f.optional_string_child ("DCPMetadataIssuer")) {