Commit d18341fb authored by Hendrik Leppkes's avatar Hendrik Leppkes Committed by Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 23a7c32a
...@@ -2611,6 +2611,8 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data, ...@@ -2611,6 +2611,8 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
if (samples) if (samples)
ac->frame->nb_samples = samples; ac->frame->nb_samples = samples;
else
av_frame_unref(ac->frame);
*got_frame_ptr = !!samples; *got_frame_ptr = !!samples;
if (is_dmono) { if (is_dmono) {
......
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