diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c b/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c
index c3ab7a6..0e7bf26 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c
@@ -1098,6 +1098,10 @@ parse_slice(GstVaapiDecoderMpeg2 *decoder,
 GstMpegVideoSequenceHdr *seq_hdr;
 GstMpegVideoSequenceScalableExt *seq_scalable_ext;
 
+
+    if (!priv->seq_hdr)
+        return GST_VAAPI_DECODER_STATUS_SUCCESS;
+
 priv->state &= (GST_MPEG_VIDEO_STATE_GOT_SEQ_HDR|
 GST_MPEG_VIDEO_STATE_GOT_SEQ_EXT|
 GST_MPEG_VIDEO_STATE_GOT_PIC_HDR|
@@ -1135,6 +1139,9 @@ decode_slice(GstVaapiDecoderMpeg2 *decoder, GstVaapiDecoderUnit *unit)
 GST_VAAPI_DECODER_CODEC_FRAME(decoder)->input_buffer;
 GstMapInfo map_info;
 
+    if (!priv->seq_hdr)
+        return GST_VAAPI_DECODER_STATUS_SUCCESS;
+
 GST_DEBUG("slice %d (%u bytes)", slice_hdr->mb_row, unit->size);
 
 if (!is_valid_state(decoder, GST_MPEG_VIDEO_STATE_VALID_PIC_HEADERS))