decoder: h265: handle the SEI NAL units included in codec_data

The prefix/suffix SEI nal units can appear in codec_data too
which weren't handled before. Parse these SEI headers to
fix the segfault.

https://bugzilla.gnome.org/show_bug.cgi?id=768544
This commit is contained in:
Allen Zhang 2016-07-21 11:24:31 +03:00 committed by Sreerenj Balachandran
parent b138e5e042
commit d9ef88230f

View file

@ -2696,6 +2696,16 @@ gst_vaapi_decoder_h265_decode_codec_data (GstVaapiDecoder *
if (status != GST_VAAPI_DECODER_STATUS_SUCCESS)
goto cleanup;
break;
case GST_H265_NAL_SUFFIX_SEI:
case GST_H265_NAL_PREFIX_SEI:
status = parse_sei (decoder, &unit);
if (status != GST_VAAPI_DECODER_STATUS_SUCCESS)
goto cleanup;
status = decode_sei (decoder, &unit);
if (status != GST_VAAPI_DECODER_STATUS_SUCCESS)
goto cleanup;
break;
}
ofs = pi->nalu.offset + pi->nalu.size;
gst_vaapi_parser_info_h265_replace (&pi, NULL);