diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2013-05-04 11:17:00 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-05-04 13:20:19 +0200 |
commit | d18341fb1121332056aecc00096159df16d01107 (patch) | |
tree | c9cefcb77802301661fa59f38d9259ade14b6de7 /libavcodec | |
parent | 23a7c32a7ade12044c600aa48966829c53dcc836 (diff) | |
download | ffmpeg-d18341fb1121332056aecc00096159df16d01107.tar.gz |
aacdec: free frame buffer if no audio was decoded
If no decoding error was detected, but still no audio was decoded, the
frame needs to be free'ed, or it will leak.
Fixes part of ticket #2095
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/aacdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index f60060adb5..cd7bbb0adb 100644 --- a/libavcodec/aacdec.c +++ b/libavcodec/aacdec.c @@ -2611,6 +2611,8 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data, if (samples) ac->frame->nb_samples = samples; + else + av_frame_unref(ac->frame); *got_frame_ptr = !!samples; if (is_dmono) { |