summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSreerenj Balachandran <sreerenj.balachandran@intel.com>2016-03-30 14:37:21 +0300
committerSreerenj Balachandran <sreerenj.balachandran@intel.com>2016-04-01 12:40:54 +0300
commita7b15c058c79c47173a6f7588dbf7c1d17e121b2 (patch)
tree32c21521d88b0cdca1232babd4cd0cd4a155bcab
parenteaac8bb889794ee2216647c23baaba4ab51c0439 (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.c4
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;