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>
This commit is contained in:
Andreas Cadhalpun 2015-11-08 19:31:00 +01:00
parent d8f13e783a
commit ff8816f717
1 changed files with 2 additions and 2 deletions

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;
}
}