Commit 7fff3df6 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec_encode_audio2: fix memleak on last padded frame

Regression introduced by 799f57acSigned-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent d891d354
......@@ -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;
}
......
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