Browse Source

aacsbr: ensure strictly monotone time borders

This fixes a division by zero in the aac_fixed decoder.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
tags/n3.0
Andreas Cadhalpun 10 years ago
parent
commit
ff8816f717
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavcodec/aacsbr_template.c

+ 2
- 2
libavcodec/aacsbr_template.c View File

@@ -720,8 +720,8 @@ static int read_sbr_grid(AACContext *ac, SpectralBandReplication *sbr,
}

for (i = 1; i <= ch_data->bs_num_env; i++) {
if (ch_data->t_env[i-1] > ch_data->t_env[i]) {
av_log(ac->avctx, AV_LOG_ERROR, "Non monotone time borders\n");
if (ch_data->t_env[i-1] >= ch_data->t_env[i]) {
av_log(ac->avctx, AV_LOG_ERROR, "Not strictly monotone time borders\n");
return -1;
}
}


Loading…
Cancel
Save