[FFmpeg-cvslog] r24081 - trunk/libavcodec/mpegaudiodec.c

michael subversion
Wed Jul 7 12:36:26 CEST 2010


Author: michael
Date: Wed Jul  7 12:36:26 2010
New Revision: 24081

Log:
Move ff_dct_init(context) out of if(one time init)
fixes calling a null pointer in issue658

Modified:
   trunk/libavcodec/mpegaudiodec.c

Modified: trunk/libavcodec/mpegaudiodec.c
==============================================================================
--- trunk/libavcodec/mpegaudiodec.c	Wed Jul  7 12:24:34 2010	(r24080)
+++ trunk/libavcodec/mpegaudiodec.c	Wed Jul  7 12:36:26 2010	(r24081)
@@ -324,6 +324,9 @@ static av_cold int decode_init(AVCodecCo
 #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 @@ static av_cold int decode_init(AVCodecCo
                     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 */



More information about the ffmpeg-cvslog mailing list