avcodec/mpegaudiodec_template: only allocate fdsp when its used

Fixes memleak

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/101/head
Michael Niedermayer 10 years ago
parent 4a0b1d9245
commit a7ebd0b011
  1. 2
      libavcodec/mpegaudiodec_template.c

@ -428,9 +428,11 @@ static av_cold int decode_init(AVCodecContext * avctx)
s->avctx = avctx;
#if USE_FLOATS
s->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
if (!s->fdsp)
return AVERROR(ENOMEM);
#endif
ff_mpadsp_init(&s->mpadsp);

Loading…
Cancel
Save