diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-07-07 10:36:26 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-07-07 10:36:26 +0000 |
commit | 69b56ed7a6215a077bc557d0e98f709d2959f473 (patch) | |
tree | df3d0a60dde5e23c7077f30ee127cde4b2ac64da /libavcodec | |
parent | c7310b7b2bb65bd31786840ecd0fab459bd3a6bd (diff) | |
download | ffmpeg-streaming-69b56ed7a6215a077bc557d0e98f709d2959f473.zip ffmpeg-streaming-69b56ed7a6215a077bc557d0e98f709d2959f473.tar.gz |
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
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mpegaudiodec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index f3ed155..4f48c15 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -324,6 +324,9 @@ static av_cold int decode_init(AVCodecContext * avctx) #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(AVCodecContext * avctx) 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 */ |