aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-07-01 02:08:25 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-08-20 14:38:26 +0200
commit7fdc2ba3d46e6f5e8cd0634f1bd4d84fee8e078c (patch)
tree23ba62c3f32d58e8ec9ba9e411c7ea16057c0e97
parent514d0e29c8cd27fbc55ae1feb0f246c623608558 (diff)
downloadffmpeg-7fdc2ba3d46e6f5e8cd0634f1bd4d84fee8e078c.tar.gz
avcodec/aacsbr: Assert that bs_num_env is positive
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 2e13a45b1a9a69456631e582bbb06954d169eb55) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/aacsbr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/aacsbr.c b/libavcodec/aacsbr.c
index 783783c8f5..9d12cb868f 100644
--- a/libavcodec/aacsbr.c
+++ b/libavcodec/aacsbr.c
@@ -1719,6 +1719,7 @@ void ff_sbr_apply(AACContext *ac, SpectralBandReplication *sbr, int id_aac,
sbr->c.sbr_hf_inverse_filter(&sbr->dsp, sbr->alpha0, sbr->alpha1,
(const float (*)[40][2]) sbr->X_low, sbr->k[0]);
sbr_chirp(sbr, &sbr->data[ch]);
+ av_assert0(sbr->data[ch].bs_num_env > 0);
sbr_hf_gen(ac, sbr, sbr->X_high,
(const float (*)[40][2]) sbr->X_low,
(const float (*)[2]) sbr->alpha0,