aacsbr: ensure strictly monotone time borders
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Sun, 8 Nov 2015 18:31:00 +0000 (19:31 +0100)
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Thu, 10 Dec 2015 23:04:04 +0000 (00:04 +0100)
This fixes a division by zero in the aac_fixed decoder.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
libavcodec/aacsbr_template.c

index dcbd574..0ae2a96 100644 (file)
@@ -720,8 +720,8 @@ static int read_sbr_grid(AACContext *ac, SpectralBandReplication *sbr,
     }
 
     for (i = 1; i <= ch_data->bs_num_env; i++) {
     }
 
     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;
         }
     }
             return -1;
         }
     }