Commit a7ebd0b0 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/mpegaudiodec_template: only allocate fdsp when its used

Fixes memleak
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 4a0b1d92
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment