diff options
author | Sreerenj Balachandran <sreerenj.balachandran@intel.com> | 2016-03-30 14:37:21 +0300 |
---|---|---|
committer | Sreerenj Balachandran <sreerenj.balachandran@intel.com> | 2016-03-30 14:37:21 +0300 |
commit | c009d29c008c36156dc7f22b91cb491216d95822 (patch) | |
tree | 699eeb5a7a9485a75890507866ce4b47ef565393 | |
parent | 35fe2abc3e37776f3ad5dba9c073e29804d3f192 (diff) |
decoder: h265: Fix offset calculation when there is more than one vps/sps/pps present in codec_data
The array_completeness, reserved bit and num_nal_units fields
in HEVCDecoderConfigurationRecord will be present for each VPS/SPS/PPS array list,
but not for each occurance of similar headers.
https://bugzilla.gnome.org/show_bug.cgi?id=764274
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapidecoder_h265.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h265.c b/gst-libs/gst/vaapi/gstvaapidecoder_h265.c index fd8250ad..0dac7dbf 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_h265.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_h265.c @@ -2650,13 +2650,15 @@ gst_vaapi_decoder_h265_decode_codec_data (GstVaapiDecoder * ofs = 23; for (i = 0; i < num_nal_arrays; i++) { num_nals = GST_READ_UINT16_BE (buf + ofs + 1); + ofs += 3; + for (j = 0; j < num_nals; j++) { pi = gst_vaapi_parser_info_h265_new (); if (!pi) return GST_VAAPI_DECODER_STATUS_ERROR_ALLOCATION_FAILED; unit.parsed_info = pi; result = gst_h265_parser_identify_nalu_hevc (priv->parser, - buf, ofs + 3, buf_size, 2, &pi->nalu); + buf, ofs, buf_size, 2, &pi->nalu); if (result != GST_H265_PARSER_OK) { status = get_status (result); goto cleanup; |