diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-06-14 15:20:48 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-06-14 15:21:23 +0200 |
commit | 7fff3df6b277d4f1ebc504e950c9de56cdc14ddd (patch) | |
tree | 33d2e97652e1b31e142ad116e6223851af587033 /libavcodec | |
parent | d891d354c551f8b645b115758596326bbe629096 (diff) | |
download | ffmpeg-7fff3df6b277d4f1ebc504e950c9de56cdc14ddd.tar.gz |
avcodec_encode_audio2: fix memleak on last padded frame
Regression introduced by 799f57ac96f9891d1a0f7d6c4b218ed536e8aca5
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/utils.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 88805024b0..d2fa73fb75 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1599,12 +1599,7 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx, avpkt->flags |= AV_PKT_FLAG_KEY; end: - if (padded_frame) { - av_freep(&padded_frame->data[0]); - if (padded_frame->extended_data != padded_frame->data) - av_freep(&padded_frame->extended_data); - av_freep(&padded_frame); - } + av_frame_free(&padded_frame); return ret; } |