Fix --standard flag to dcpomatic2_cli (github #9). v2.14.38
authorCarl Hetherington <cth@carlh.net>
Mon, 21 Sep 2020 17:33:11 +0000 (19:33 +0200)
committerCarl Hetherington <cth@carlh.net>
Mon, 21 Sep 2020 17:33:11 +0000 (19:33 +0200)
src/lib/create_cli.cc
test/create_cli_test.cc

index 878ee6fddd7fb7ce8ff6719366028164a577b802..f80af758a92e1cf036a1e5c2270592ee320a94dd 100644 (file)
@@ -211,6 +211,10 @@ CreateCLI::CreateCLI (int argc, char* argv[])
                return;
        }
 
+       if (standard_string == "interop") {
+               standard = dcp::INTEROP;
+       }
+
        if (content.empty()) {
                error = String::compose("%1: no content specified", argv[0]);
                return;
index b92cb284b9e8532ba9efbfb16005e67580ad3b71..e69cc4f336b637c8e524be33b6621db929d40b24 100644 (file)
@@ -107,6 +107,10 @@ BOOST_AUTO_TEST_CASE (create_cli_test)
        BOOST_CHECK (!cc.error);
        BOOST_CHECK_EQUAL (cc.standard, dcp::SMPTE);
 
+       cc = run ("dcpomatic2_create x --content-ratio 185 --standard interop");
+       BOOST_CHECK (!cc.error);
+       BOOST_CHECK_EQUAL (cc.standard, dcp::INTEROP);
+
        cc = run ("dcpomatic2_create x --content-ratio 185 --standard SMPTEX");
        BOOST_CHECK (cc.error);