Fix thinko when trying to keep channel counts even.
[dcpomatic.git] / src / lib / create_cli.cc
index 3a0c3361771a9b44fc739c9bd47b1bd0691567db..6752be4094125f3d26dd7629f246b4215cec118b 100644 (file)
@@ -137,7 +137,7 @@ CreateCLI::CreateCLI (int argc, char* argv[])
        optional<dcp::Channel> channel;
        optional<float> gain;
        optional<boost::filesystem::path> kdm;
-       optional<std::string> cpl;
+       optional<string> cpl;
 
        int i = 1;
        while (i < argc) {
@@ -201,7 +201,8 @@ CreateCLI::CreateCLI (int argc, char* argv[])
                argument_option(i, argc, argv, "-f", "--dcp-frame-rate",   &claimed, &error, &dcp_frame_rate_int);
                argument_option(i, argc, argv, "",   "--container-ratio",  &claimed, &error, &container_ratio_string);
                argument_option(i, argc, argv, "-s", "--still-length",     &claimed, &error, &still_length, string_to_nonzero_int);
-               argument_option(i, argc, argv, "",   "--standard",         &claimed, &error, &standard_string);
+               /* See comment below about --cpl */
+               argument_option(i, argc, argv, "",   "--standard",         &claimed, &error, &standard_string, string_to_string);
                argument_option(i, argc, argv, "",   "--config",           &claimed, &error, &config_dir, string_to_path);
                argument_option(i, argc, argv, "-o", "--output",           &claimed, &error, &output_dir, string_to_path);
                argument_option(i, argc, argv, "",   "--j2k-bandwidth",    &claimed, &error, &j2k_bandwidth_int);
@@ -380,7 +381,7 @@ CreateCLI::make_film() const
                        channels = std::max(channels, static_cast<int>(*cli_content.channel) + 1);
                }
        }
-       if (channels % 1) {
+       if (channels % 2) {
                ++channels;
        }