According to spec, the JPEG_MARKER_DRI(Restart interval definition)
marker can come before the SOS marker. So we should not check the SOS
state when parsing the DRI marker.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5053>
break;
case GST_JPEG_MARKER_DRI:
- if (!(valid_state (priv->state, GST_JPEG_DECODER_STATE_GOT_SOS)
- && decode_restart_interval (self, &seg)))
+ if (!decode_restart_interval (self, &seg)) {
+ GST_WARNING_OBJECT (self, "Fail to decode restart interval");
goto unmap_and_error;
+ }
break;
case GST_JPEG_MARKER_DNL:
break;