aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-05 04:27:49 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-12-05 05:16:14 +0100
commitaa24dd487f1a4d5d4ed8b63a58ab4490afa8dc76 (patch)
treebfe40f21f3f68bf720d1c65e40411d130775d6e9 /libavcodec
parent3bcd1daad7993d2d23704582260fe45f4823a16d (diff)
downloadffmpeg-aa24dd487f1a4d5d4ed8b63a58ab4490afa8dc76.tar.gz
avcodec/mpegaudiodec_template: only allocate fdsp when its used
Fixes memleak Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit a7ebd0b011f9576c843a86bd6a1828ecaa6faf3a) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpegaudiodec_template.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mpegaudiodec_template.c b/libavcodec/mpegaudiodec_template.c
index bbd07c5f0b..138a107b85 100644
--- a/libavcodec/mpegaudiodec_template.c
+++ b/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);