aacsbr: prevent multiple ff_aac_sbr_ctx_init()
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 23 Sep 2011 20:31:57 +0000 (22:31 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 23 Sep 2011 20:31:57 +0000 (22:31 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/aacsbr.c

index 10b8daf..a213827 100644 (file)
@@ -131,6 +131,8 @@ av_cold void ff_aac_sbr_init(void)
 av_cold void ff_aac_sbr_ctx_init(AACContext *ac, SpectralBandReplication *sbr)
 {
     float mdct_scale;
+    if(sbr->mdct.mdct_bits)
+        return;
     sbr->kx[0] = sbr->kx[1] = 32; //Typo in spec, kx' inits to 32
     sbr->data[0].e_a[1] = sbr->data[1].e_a[1] = -1;
     sbr->data[0].synthesis_filterbank_samples_offset = SBR_SYNTHESIS_BUF_SIZE - (1280 - 128);