Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
image/jpeg: bad RST marker due to pre-reset marker byte alignment #28717
What did you do?
While writing a small app to decode and process the JPEG frames from webcams running in Motion-JPEG mode, I found that images from a Logitech C270 webcam failed to decode when using the
I isolated a frame that caused the decoder to fail and stepped through the decoding with a debugger and compared it to the part of the jpeg spec in F1.2.3 from https://www.w3.org/Graphics/JPEG/itu-t81.pdf#page=36&zoom=auto,-200,43.
Turns out the jpeg decoder doesn't handle
Here's an example frame from the stream:
And here's a play.golang.org link with a reproducer: https://play.golang.org/p/QTTKiHRfrLe
I've experimented with a fix in the handling of the rst marker in the
What did you expect to see?
Expected the frame to decode successfully as it is in other software like VLC and web browsers.
What did you see instead?
Does this issue reproduce with the latest release (go1.11.2)?