summaryrefslogtreecommitdiff
path: root/src/lib/create_cli.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-09-30 12:32:42 +0200
committerCarl Hetherington <cth@carlh.net>2023-09-30 12:32:42 +0200
commitcbb6ee07e5e28a8d7f99425fff326d6f6edeabb2 (patch)
treea7a6bd5483bf3f7670bc22ae3ddb56ff4c9adc58 /src/lib/create_cli.cc
parent8a112904ee3cbdcd8e6c88e0a46c67e8d387ba9e (diff)
Allow DCP content type from template to work.
Diffstat (limited to 'src/lib/create_cli.cc')
-rw-r--r--src/lib/create_cli.cc17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/lib/create_cli.cc b/src/lib/create_cli.cc
index 41dd44d1a..ed62abefb 100644
--- a/src/lib/create_cli.cc
+++ b/src/lib/create_cli.cc
@@ -127,7 +127,7 @@ argument_option (
CreateCLI::CreateCLI (int argc, char* argv[])
: version (false)
{
- string dcp_content_type_string = "TST";
+ optional<string> dcp_content_type_string;
string container_ratio_string;
optional<string> standard_string;
int dcp_frame_rate_int = 0;
@@ -273,10 +273,12 @@ CreateCLI::CreateCLI (int argc, char* argv[])
_j2k_bandwidth = j2k_bandwidth_int * 1000000;
}
- _dcp_content_type = DCPContentType::from_isdcf_name(dcp_content_type_string);
- if (!_dcp_content_type) {
- error = String::compose("%1: unrecognised DCP content type '%2'", argv[0], dcp_content_type_string);
- return;
+ if (dcp_content_type_string) {
+ _dcp_content_type = DCPContentType::from_isdcf_name(*dcp_content_type_string);
+ if (!_dcp_content_type) {
+ error = String::compose("%1: unrecognised DCP content type '%2'", argv[0], *dcp_content_type_string);
+ return;
+ }
}
if (!container_ratio_string.empty()) {
@@ -337,13 +339,16 @@ CreateCLI::make_film() const
* or not.
*/
film->set_interop(false);
+ film->set_dcp_content_type(DCPContentType::from_isdcf_name("TST"));
}
film->set_name(_name);
if (_container_ratio) {
film->set_container(_container_ratio);
}
- film->set_dcp_content_type(_dcp_content_type);
+ if (_dcp_content_type) {
+ film->set_dcp_content_type(_dcp_content_type);
+ }
if (_standard) {
film->set_interop(*_standard == dcp::Standard::INTEROP);
}