Closed awused closed 5 months ago
Probably happened in the switch to using image-webp
. The fix should be to call num_frames
at the start and then return None once that many frames have been decoded. Or maybe once num_frames * loop_count
many frames have been decoded
Broken in 0.25.x and git head, unsure about when it started since I was hoping to replace the webp-animation crate with this, but it's probably been unused and broken for a while.
Expected
Frames iterator returns None after the last frame.
Actual behaviour
Returns either a
DecodingError { format: Exact(WebP), underlying: Some(NoMoreFrames) }
or an IO Error from a BufReader as it tries to read past the end of the file.Reproduction steps
Call
into_frames
on an WebPDecoder for an animated image. Here's a test that runs on your own test data.