Browse Source

Move ff_dct_init(context) out of if(one time init)

fixes calling a null pointer in issue658

Originally committed as revision 24081 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/n0.8
Michael Niedermayer 15 years ago
parent
commit
69b56ed7a6
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      libavcodec/mpegaudiodec.c

+ 3
- 3
libavcodec/mpegaudiodec.c View File

@@ -323,6 +323,9 @@ static av_cold int decode_init(AVCodecContext * avctx)
s->apply_window_mp3 = apply_window_mp3_c; s->apply_window_mp3 = apply_window_mp3_c;
#if HAVE_MMX && CONFIG_FLOAT #if HAVE_MMX && CONFIG_FLOAT
ff_mpegaudiodec_init_mmx(s); ff_mpegaudiodec_init_mmx(s);
#endif
#if CONFIG_FLOAT
ff_dct_init(&s->dct, 5, DCT_II);
#endif #endif
if (HAVE_ALTIVEC && CONFIG_FLOAT) ff_mpegaudiodec_init_altivec(s); if (HAVE_ALTIVEC && CONFIG_FLOAT) ff_mpegaudiodec_init_altivec(s);


@@ -356,9 +359,6 @@ static av_cold int decode_init(AVCodecContext * avctx)
scale_factor_mult[i][2]); 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)); RENAME(ff_mpa_synth_init)(RENAME(ff_mpa_synth_window));


/* huffman decode tables */ /* huffman decode tables */


Loading…
Cancel
Save