Commit 54721a6b authored by Rain Liu's avatar Rain Liu Committed by David Michael Barr

Check if CLI option for keyframe interval is in range (#1275)

Enforce a lower bound of 1. Fixes #1211.
parent bb8d5690
......@@ -353,6 +353,10 @@ fn parse_config(matches: &ArgMatches<'_>) -> EncoderConfig {
}
// Validate arguments
if max_interval < 1 {
panic!("Keyframe interval must be greater than 0");
}
if speed > 10 {
panic!("Speed must be between 0-10");
} else if min_interval > max_interval {
......
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