mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2025-12-11 20:15:30 +01:00
Rustfmt
This commit is contained in:
parent
8b3e9a1408
commit
dd56820898
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user