Commit 410ec857 authored by Raphaël Zumer's avatar Raphaël Zumer

Override min-keyint in CLI if keyint is smaller

parent 2cec0f9a
......@@ -175,8 +175,12 @@ pub fn parse_cli() -> CliOptions {
fn parse_config(matches: &ArgMatches) -> EncoderConfig {
let speed = matches.value_of("SPEED").unwrap().parse().unwrap();
let quantizer = matches.value_of("QP").unwrap().parse().unwrap();
let min_interval = matches.value_of("MIN_KEYFRAME_INTERVAL").unwrap().parse().unwrap();
let max_interval = matches.value_of("KEYFRAME_INTERVAL").unwrap().parse().unwrap();
let max_interval: u64 = matches.value_of("KEYFRAME_INTERVAL").unwrap().parse().unwrap();
let mut min_interval: u64 = matches.value_of("MIN_KEYFRAME_INTERVAL").unwrap().parse().unwrap();
if matches.occurrences_of("MIN_KEYFRAME_INTERVAL") == 0 {
min_interval = min_interval.min(max_interval);
}
// Validate arguments
if quantizer == 0 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment