Fix --standard flag to dcpomatic2_cli (github #9).
authorCarl Hetherington <cth@carlh.net>
Mon, 21 Sep 2020 17:49:31 +0000 (19:49 +0200)
committerCarl Hetherington <cth@carlh.net>
Mon, 21 Sep 2020 17:49:31 +0000 (19:49 +0200)
Forward-ported-from-commit: c1e8c8638bcb3b4c9d90adc3719f38fa7bf81be9
Forward-ported-from-branch: master

src/lib/create_cli.cc
test/create_cli_test.cc

index aec12e59edbc6d0668082796a824a8aa93766f5e..7acd5756f7b88d3a071262a1dc7d6f01884304c0 100644 (file)
@@ -191,6 +191,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 5425969b6d8f1c4acd745772b4a4b9dfec1f465f..e88e0820bd660d31b571e7e4cd31b6338edce4fb 100644 (file)
@@ -100,6 +100,10 @@ BOOST_AUTO_TEST_CASE (create_cli_test)
        BOOST_CHECK (!cc.error);
        BOOST_CHECK_EQUAL (cc.standard, dcp::SMPTE);
 
+       cc = run ("dcpomatic2_create x --standard interop");
+       BOOST_CHECK (!cc.error);
+       BOOST_CHECK_EQUAL (cc.standard, dcp::INTEROP);
+
        cc = run ("dcpomatic2_create x --standard SMPTEX");
        BOOST_CHECK (cc.error);