Commit 720a1de5 authored by Anton Khirnov's avatar Anton Khirnov

lavc: free the padded last frame during audio encoding properly

parent eeeb5c29
...@@ -1245,12 +1245,7 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx, ...@@ -1245,12 +1245,7 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx,
avpkt->flags |= AV_PKT_FLAG_KEY; avpkt->flags |= AV_PKT_FLAG_KEY;
end: end:
if (padded_frame) { av_frame_free(&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);
}
return ret; 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