va: jpegdecoder: Do not check SOS state when parsing DRI marker.

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>
This commit is contained in:
He Junyan 2023-02-12 16:11:34 +08:00 committed by Tim-Philipp Müller
parent 1e7c085791
commit 107553843c

View file

@ -481,9 +481,10 @@ gst_jpeg_decoder_handle_frame (GstVideoDecoder * decoder,
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;