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/3943>
This commit is contained in:
He Junyan 2023-02-12 16:11:34 +08:00 committed by Víctor Manuel Jáquez Leal
parent 1f1e7a3d99
commit cbbfab0f3b

View file

@ -479,9 +479,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;