From dd56820898001c0260e556abaf30d4cf7a985f10 Mon Sep 17 00:00:00 2001 From: Ericson Soares Date: Tue, 10 Dec 2024 12:37:14 -0300 Subject: [PATCH] Rustfmt --- crates/ffmpeg/src/filter_graph.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/crates/ffmpeg/src/filter_graph.rs b/crates/ffmpeg/src/filter_graph.rs index f0ec54264..e9547f9ab 100644 --- a/crates/ffmpeg/src/filter_graph.rs +++ b/crates/ffmpeg/src/filter_graph.rs @@ -232,16 +232,16 @@ fn thumb_scale_filter_args( // if the pixel aspect ratio is defined and is not 1, we have an anamorphic stream if pixel_aspect_ratio.num != 0 && pixel_aspect_ratio.num != pixel_aspect_ratio.den { match std::panic::catch_unwind(|| { - width - .checked_mul(pixel_aspect_ratio.num.unsigned_abs()) - .and_then(|v| v.checked_div(pixel_aspect_ratio.den.unsigned_abs())) - }) { - Ok(Some(w)) => width = w, - Ok(None) | Err(_) => { - eprintln!("Warning: Failed to calculate width with pixel aspect ratio"); - // Keep the original width as fallback - } - }; + width + .checked_mul(pixel_aspect_ratio.num.unsigned_abs()) + .and_then(|v| v.checked_div(pixel_aspect_ratio.den.unsigned_abs())) + }) { + Ok(Some(w)) => width = w, + Ok(None) | Err(_) => { + eprintln!("Warning: Failed to calculate width with pixel aspect ratio"); + // Keep the original width as fallback + } + }; if size != 0 { if height > width { width = (width * size) / height;