comparison mpegaudiodec.c @ 12043:f9a0bd0888a4 libavcodec

mpegaudio: call ff_mpegaudiodec_init_mmx() only from float decoder The mmx code is floating-point only, and this function does not know from which decoder it is called. Without this change, the integer decoder only "works" because the size of the context struct is smaller in this case, and the mmx init function writes the function pointer outside the allocated context.
author mru
date Thu, 01 Jul 2010 23:21:17 +0000
parents 6681ac7bc917
children 49c528a39187
comparison
equal deleted inserted replaced
12042:dc4feabd4dab 12043:f9a0bd0888a4
320 static int init=0; 320 static int init=0;
321 int i, j, k; 321 int i, j, k;
322 322
323 s->avctx = avctx; 323 s->avctx = avctx;
324 s->apply_window_mp3 = apply_window_mp3_c; 324 s->apply_window_mp3 = apply_window_mp3_c;
325 #if HAVE_MMX 325 #if HAVE_MMX && CONFIG_FLOAT
326 ff_mpegaudiodec_init_mmx(s); 326 ff_mpegaudiodec_init_mmx(s);
327 #endif 327 #endif
328 if (HAVE_ALTIVEC && CONFIG_FLOAT) ff_mpegaudiodec_init_altivec(s); 328 if (HAVE_ALTIVEC && CONFIG_FLOAT) ff_mpegaudiodec_init_altivec(s);
329 329
330 avctx->sample_fmt= OUT_FMT; 330 avctx->sample_fmt= OUT_FMT;