From cbbfab0f3bd809d1b708789e74f17d6d4c0e7905 Mon Sep 17 00:00:00 2001 From: He Junyan Date: Sun, 12 Feb 2023 16:11:34 +0800 Subject: [PATCH] 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: --- subprojects/gst-plugins-bad/sys/va/gstjpegdecoder.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/va/gstjpegdecoder.c b/subprojects/gst-plugins-bad/sys/va/gstjpegdecoder.c index 9771f5c6f8..2936ce6e2c 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstjpegdecoder.c +++ b/subprojects/gst-plugins-bad/sys/va/gstjpegdecoder.c @@ -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;