Skip to content

Commit

Permalink
Clear transition mode array for all subbands.
Browse files Browse the repository at this point in the history
Number of XBR subbands might be theoretically greater than core. With
XBR transition mode enabled stale core transition mode might be
referenced. Fix XBR subframe parsing in this case by zeroing entire
transition mode array beforehand.
  • Loading branch information
foo86 committed May 1, 2015
1 parent 29e1dfb commit 9eca5f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libdcadec/core_decoder.c
Expand Up @@ -410,7 +410,7 @@ static int parse_subframe_header(struct core_decoder *core, int sf,
// Transition mode
for (ch = xch_base; ch < core->nchannels; ch++) {
// Clear transition mode for all subbands
for (band = 0; band < core->nsubbands[ch]; band++)
for (band = 0; band < MAX_SUBBANDS; band++)
core->transition_mode[sf][ch][band] = 0;

// Transient possible only if more than one subsubframe
Expand Down

0 comments on commit 9eca5f6

Please sign in to comment.