Skip to content

jpegparse: reset parse state when the SOI is not the first marker.

He Junyan requested to merge He_Junyan/gstreamer:jpeg_data_not_complete into main

There may be garbage or some bits before a SOI comes in some problematic mjpeg streams. For example, some network error may cause the EOI marker of the previous frame lost, and when the new frame's SOI comes, we still use the state of the last frame, which will generate errors.

For this kind of frames without EOI, if that frame already has some data (the SOS segment is detected), we still push it as a frame with CORRUPTED flag set. But if not, we just discard all the data before the new SOI.

Merge request reports