Unverified Commit 03943f47 authored by David Michael Barr's avatar David Michael Barr Committed by GitHub
Browse files

Fix an off-by-one with --skip parameter

The default value of 0 is skipping the first frame.
parent 8093e4ee
......@@ -144,11 +144,9 @@ fn main() {
);
ctx.set_limit(cli.limit as u64);
let mut frame_current_count = 0;
while frame_current_count <= cli.skip {
y4m_dec.read_frame().expect("Skipped more frames than in the input");
frame_current_count+=1;
for _ in 0..cli.skip {
y4m_dec.read_frame().expect("Skipped more frames than in the input");
}
while let Ok(frame_info) = process_frame(&mut ctx, &mut cli.io.output, &mut y4m_dec, y4m_enc.as_mut()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment