changeset 12102:06c7d6e5eeb6 libavcodec

Move ff_dct_init(context) out of if(one time init) fixes calling a null pointer in issue658
author michael
date Wed, 07 Jul 2010 10:36:26 +0000
parents ab330d7112ad
children 54b234e105a0
files mpegaudiodec.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mpegaudiodec.c	Wed Jul 07 10:24:34 2010 +0000
+++ b/mpegaudiodec.c	Wed Jul 07 10:36:26 2010 +0000
@@ -324,6 +324,9 @@
 #if HAVE_MMX && CONFIG_FLOAT
     ff_mpegaudiodec_init_mmx(s);
 #endif
+#if CONFIG_FLOAT
+    ff_dct_init(&s->dct, 5, DCT_II);
+#endif
     if (HAVE_ALTIVEC && CONFIG_FLOAT) ff_mpegaudiodec_init_altivec(s);
 
     avctx->sample_fmt= OUT_FMT;
@@ -356,9 +359,6 @@
                     scale_factor_mult[i][2]);
         }
 
-#if CONFIG_FLOAT
-        ff_dct_init(&s->dct, 5, DCT_II);
-#endif
         RENAME(ff_mpa_synth_init)(RENAME(ff_mpa_synth_window));
 
         /* huffman decode tables */