Skip to content

Commit

Permalink
refactor: width check
Browse files Browse the repository at this point in the history
  • Loading branch information
flazepe committed Nov 22, 2024
1 parent cd5e140 commit 3a570e4
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/ffmpeg/inputs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,8 @@ impl Inputs {
for input in self.inputs.iter() {
let metadata = get_input_metadata(input)?;

if auto_resize {
if let Some((resize_width, _)) = self.resize {
if metadata.width > resize_width {
self.resize = Some((metadata.width, metadata.height));
}
} else {
self.resize = Some((metadata.width, metadata.height));
}
if auto_resize && metadata.width > self.resize.map(|(width, _)| width).unwrap_or(0) {
self.resize = Some((metadata.width, metadata.height));
}

input_metadata.push(metadata);
Expand Down

0 comments on commit 3a570e4

Please sign in to comment.