Skip to content

Commit

Permalink
wip: fix progress bar when using --start and --increment
Browse files Browse the repository at this point in the history
  • Loading branch information
superyu1337 committed Dec 1, 2024
1 parent f784813 commit 5a4b99d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/video.rs
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ fn compare_videos_inner<D: Decoder + 'static, E: Decoder + 'static>(
let frame_count = source_frame_count.or(distorted_frame_count);
let pb = if let Some(frame_count) = frame_count {
let fc = frames_to_compare.unwrap_or(frame_count - start_frame)
.min((frame_count as f64 / inc as f64).ceil() as usize);
.min(((frame_count - start_frame) as f64 / inc as f64).ceil() as usize);

ProgressBar::new(fc as u64)
.with_style(pretty_progress_style())
Expand Down

0 comments on commit 5a4b99d

Please sign in to comment.