let mut seek_time = 0u64;
let mut vpfx: Option<String> = None;
let mut apfx: Option<&str> = None;
+ let mut ignore_errors = false;
while (cur_arg < args.len()) && args[cur_arg].starts_with('-') {
match args[cur_arg].as_str() {
}
vpfx = Some(args[cur_arg].clone());
},
+ "-ignerr" => { ignore_errors = true; },
_ => { println!("unknown option {}", args[cur_arg]); return; },
}
cur_arg += 1;
},
Err(reason) => {
println!("error decoding frame {:?}", reason);
- break;
+ if !ignore_errors {
+ break;
+ }
},
};
if pkt.get_pts() != None && lastpts.is_some() && pkt.get_pts() >= lastpts { break; }