aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2015-11-08 19:31:00 +0100
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2015-12-17 20:03:34 +0100
commitcb44683a8c5cb0effdf99cc1378e998e5c86d271 (patch)
treef2e1403fea8bc476ec6b54ce7a5f3070c2b22b7f
parentdcd837e41c83c6eac52d64b8d8f6a96aacf674cb (diff)
downloadffmpeg-cb44683a8c5cb0effdf99cc1378e998e5c86d271.tar.gz
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> (cherry picked from commit ff8816f7172b94028131ee2426ba35e875d973ae) Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
-rw-r--r--libavcodec/aacsbr_template.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/aacsbr_template.c b/libavcodec/aacsbr_template.c
index a49940a076..4f845ee6f8 100644
--- a/libavcodec/aacsbr_template.c
+++ b/libavcodec/aacsbr_template.c
@@ -718,8 +718,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;
}
}