Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
jpeg-decoder/src/decoder.rs
Line 352 in 0c6f5a2
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.