avcodec/aacsbr: Assert that bs_num_env is positive
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 1 Jul 2015 00:08:25 +0000 (02:08 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 1 Jul 2015 00:34:01 +0000 (02:34 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/aacsbr.c

index ca6dad7..a39b78d 100644 (file)
@@ -1726,6 +1726,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,