I has some webcam from different venders that i use v4l2 to capture mjpg images to do some processing. When i used image-rs to decode some of the images, i got Error: IoError(Custom { kind: UnexpectedEof, error: "failed to fill whole buffer" }).
And there is pull request from #100 that removed code to skip optional 0xff. So I added it back.
There is also a test image i took that have this error before. but I'm not sure where to put this image in the tests dir, since the crash test doest care decode result.
I has some webcam from different venders that i use v4l2 to capture mjpg images to do some processing. When i used image-rs to decode some of the images, i got
Error: IoError(Custom { kind: UnexpectedEof, error: "failed to fill whole buffer" })
.After some investigation i found that the https://github.com/image-rs/jpeg-decoder/blob/0c6f5a20801c9530fb99487a69ba39037ce15d0c/src/decoder.rs#L352 function skipped EOI marker when there is multiple 0xff before 0xD9.
And there is pull request from #100 that removed code to skip optional 0xff. So I added it back.
There is also a test image i took that have this error before. but I'm not sure where to put this image in the tests dir, since the crash test doest care decode result.