mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
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
This commit is contained in:
parent
35fe2abc3e
commit
c009d29c00
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue