Browse Source

aacsbr: fix integer overflow

Fixes CID603186
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.1
Michael Niedermayer 13 years ago
parent
commit
a15adabdd3
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/aacsbr.c

+ 1
- 1
libavcodec/aacsbr.c View File

@@ -749,7 +749,7 @@ static int read_sbr_grid(AACContext *ac, SpectralBandReplication *sbr,
if (ch_data->bs_frame_class == FIXFIX) { if (ch_data->bs_frame_class == FIXFIX) {
idx = ch_data->bs_num_env >> 1; idx = ch_data->bs_num_env >> 1;
} else if (ch_data->bs_frame_class & 1) { // FIXVAR or VARVAR } else if (ch_data->bs_frame_class & 1) { // FIXVAR or VARVAR
idx = ch_data->bs_num_env - FFMAX(bs_pointer - 1, 1);
idx = ch_data->bs_num_env - FFMAX((int)bs_pointer - 1, 1);
} else { // VARFIX } else { // VARFIX
if (!bs_pointer) if (!bs_pointer)
idx = 1; idx = 1;


Loading…
Cancel
Save