lavc: free the padded last frame during audio encoding properly

This commit is contained in:
Anton Khirnov 2013-06-18 11:41:04 +02:00
parent eeeb5c291d
commit 720a1de52f
1 changed files with 1 additions and 6 deletions

View File

@ -1245,12 +1245,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;
}