- let frm = dec.decode(dsupp, &pkt).unwrap();
- if !noout {
- match writers[idx] {
- Outputter::Video(ref mut wr) => { wr.output_frame(&pkt, frm); },
- Outputter::Audio(ref mut wr) => { wr.output_frame(&pkt, frm); },
- _ => {},
- };
- }
+ match dec.decode(dsupp, &pkt) {
+ Ok(frm) => {
+ if !noout {
+ match writers[idx] {
+ Outputter::Video(ref mut wr) => { wr.output_frame(&pkt, frm); },
+ Outputter::Audio(ref mut wr) => { wr.output_frame(&pkt, frm); },
+ _ => {},
+ };
+ }
+ },
+ Err(DecoderError::MissingReference) if seek_time > 0 => {
+ println!("ignoring missing ref");
+ },
+ Err(reason) => {
+ println!("error decoding frame {:?}", reason);
+ break;
+ },
+ };