Skip to content

Commit

Permalink
Merge pull request #72 from ittiam-systems/decoder_bug_fixes
Browse files Browse the repository at this point in the history
Decoder Bug Fixes
  • Loading branch information
tripti-tiwari authored Dec 26, 2023
2 parents daf21a9 + 0889ef4 commit a7019ea
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions decoder/ixheaacd_mps_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -825,12 +825,21 @@ IA_ERRORCODE ixheaacd_ld_mps_frame_parsing(
bits_param_slot = 4;

if (bs_frame_type) {
WORD32 prev_param_slot = -1;
for (i = 0; i < self->num_parameter_sets; i++) {
self->param_slots[i] =
ixheaacd_read_bits_buf(it_bit_buff, bits_param_slot);
self->param_slots[i] = ixheaacd_read_bits_buf(it_bit_buff, bits_param_slot);

if (prev_param_slot >= self->param_slots[i] || self->param_slots[i] >= self->time_slots) {
return IA_FATAL_ERROR;
}
prev_param_slot = self->param_slots[i];
}
} else {
self->param_slots[0] = self->time_slots - 1;
for (i = 0; i < self->num_parameter_sets; i++) {
self->param_slots[i] = (((self->time_slots * (i + 1)) + self->num_parameter_sets - 1) /
self->num_parameter_sets) -
1;
}
}

frame->independency_flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
Expand Down

0 comments on commit a7019ea

Please sign in to comment.