mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 03:39:45 +00:00
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>
This commit is contained in:
parent
23a7c32a7a
commit
d18341fb11
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user