meh / rust-ffmpeg

Safe FFmpeg wrapper.
Do What The F*ck You Want To Public License
461 stars 96 forks source link

PacketIter ignores errors #133

Closed kornelski closed 3 years ago

kornelski commented 4 years ago

https://github.com/meh/rust-ffmpeg/blob/67b7f13305c457faa6f95f3a3d9921110e93d586/src/format/context/input.rs#L173

It would be better if this iterator returned Result<(Stream<'a>, Packet), Error> instead, so that the caller can handle errors (other than EOF).

With Err(..) => () I'm worried that this could end up being an infinite loop if ffmpeg can't skip over the error.

meh commented 3 years ago

That's a very good point.

meh commented 3 years ago

Fixed on master.