guint is_constructed : 1;
guint is_opened : 1;
guint is_avc : 1;
+ guint got_sps : 1;
+ guint got_pps : 1;
guint has_context : 1;
guint progressive_sequence : 1;
};
if (result != GST_H264_PARSER_OK)
return get_status(result);
+ priv->got_pps = TRUE;
return GST_VAAPI_DECODER_STATUS_SUCCESS;
}
if (result != GST_H264_PARSER_OK)
return get_status(result);
+ priv->got_sps = TRUE;
return GST_VAAPI_DECODER_STATUS_SUCCESS;
}
static GstVaapiDecoderStatus
decode_nalu(GstVaapiDecoderH264 *decoder, GstH264NalUnit *nalu)
{
+ GstVaapiDecoderH264Private * const priv = decoder->priv;
GstVaapiDecoderStatus status;
switch (nalu->type) {
case GST_H264_NAL_SLICE_IDR:
/* fall-through. IDR specifics are handled in init_picture() */
case GST_H264_NAL_SLICE:
+ if (!priv->got_sps || !priv->got_pps)
+ return GST_VAAPI_DECODER_STATUS_SUCCESS;
status = decode_slice(decoder, nalu);
break;
case GST_H264_NAL_SPS: