Skip to content

Commit e9e01ed

Browse files
committed
clippy
1 parent acdc1be commit e9e01ed

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

crates/video-decode/src/ffmpeg.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ fn configure_software_threading(decoder: &mut avcodec::decoder::Video, width: u3
149149
let thread_count = if pixel_count > 8294400 {
150150
0
151151
} else if pixel_count > 2073600 {
152-
cpu_count.min(8).max(2) as i32
152+
cpu_count.clamp(2, 8) as i32
153153
} else {
154-
cpu_count.min(6).max(2) as i32
154+
cpu_count.clamp(2, 6) as i32
155155
};
156156

157157
let thread_type = ffmpeg::sys::FF_THREAD_FRAME | ffmpeg::sys::FF_THREAD_SLICE;

0 commit comments

Comments
 (0)