mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/mpegaudiodec_template: only allocate fdsp when its used
Fixes memleak Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
4a0b1d9245
commit
a7ebd0b011
|
@ -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…
Reference in New Issue