Allow disabling extra splits by setting to 0 (#371)

This commit is contained in:
Josh Holmer 2021-10-03 13:06:38 -04:00 committed by GitHub
parent f52c82f15c
commit 657810d162
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,6 +85,7 @@ pub struct Args {
pub sc_downscale_height: Option<usize>,
/// Number of frames after which make split
/// Set to 0 to disable
#[structopt(short = "x", long, default_value = "240")]
pub extra_split: usize,
@ -285,7 +286,11 @@ pub fn cli() -> anyhow::Result<()> {
.unwrap_or_else(vapoursynth::best_available_chunk_method),
concat: args.concat,
encoder: args.encoder,
extra_splits_len: Some(args.extra_split),
extra_splits_len: if args.extra_split > 0 {
Some(args.extra_split)
} else {
None
},
input: args.input.to_str().unwrap().to_owned(),
keep: args.keep,
min_q: args.min_q,