summaryrefslogtreecommitdiff
path: root/libavcodec/mpegaudiodec_float.c
diff options
context:
space:
mode:
authorflybird2k@gmail.com <flybird2k@gmail.com>2010-07-18 19:53:24 +0000
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>2010-07-18 19:53:24 +0000
commit3aee5f69850a8236aa05ea2f79682c15cbe3562b (patch)
tree5ec21fd87191b14df8767b39c90be654db1b63e4 /libavcodec/mpegaudiodec_float.c
parent2bab5d3e730a184468f38fca4aaf93e29a691018 (diff)
Fix memleak when using mp*float decoder.
Patch by flybird2k at gmail Originally committed as revision 24307 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegaudiodec_float.c')
-rw-r--r--libavcodec/mpegaudiodec_float.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/libavcodec/mpegaudiodec_float.c b/libavcodec/mpegaudiodec_float.c
index 93adaf8cc8..9150b33ba2 100644
--- a/libavcodec/mpegaudiodec_float.c
+++ b/libavcodec/mpegaudiodec_float.c
@@ -80,6 +80,13 @@ static void compute_antialias_float(MPADecodeContext *s,
}
}
+static av_cold int decode_end(AVCodecContext * avctx)
+{
+ MPADecodeContext *s = avctx->priv_data;
+ ff_dct_end(&s->dct);
+ return 0;
+}
+
#if CONFIG_MP1FLOAT_DECODER
AVCodec mp1float_decoder =
{
@@ -89,7 +96,7 @@ AVCodec mp1float_decoder =
sizeof(MPADecodeContext),
decode_init,
NULL,
- NULL,
+ decode_end,
decode_frame,
CODEC_CAP_PARSE_ONLY,
.flush= flush,
@@ -105,7 +112,7 @@ AVCodec mp2float_decoder =
sizeof(MPADecodeContext),
decode_init,
NULL,
- NULL,
+ decode_end,
decode_frame,
CODEC_CAP_PARSE_ONLY,
.flush= flush,
@@ -121,7 +128,7 @@ AVCodec mp3float_decoder =
sizeof(MPADecodeContext),
decode_init,
NULL,
- NULL,
+ decode_end,
decode_frame,
CODEC_CAP_PARSE_ONLY,
.flush= flush,
@@ -137,7 +144,7 @@ AVCodec mp3adufloat_decoder =
sizeof(MPADecodeContext),
decode_init,
NULL,
- NULL,
+ decode_end,
decode_frame_adu,
CODEC_CAP_PARSE_ONLY,
.flush= flush,