You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
#[test]
fn webp_decode() {
let decoder = WebPDecoder::new(std::io::Cursor::new(
std::fs::read("tests/images/webp/extended_images/anim.webp").unwrap(),
))
.unwrap();
let frames = decoder.into_frames();
for result in frames {
result.unwrap();
}
}
thread 'webp_decode' panicked at tests/limits_anim.rs:20:16:
called `Result::unwrap()` on an `Err` value: Decoding(DecodingError { format: Exact(WebP), underlying: Some(NoMoreFrames) })
The text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: