[FFmpeg-cvslog] lavc: free the padded last frame during audio encoding properly

Anton Khirnov git at videolan.org
Fri Jun 21 11:18:36 CEST 2013


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Tue Jun 18 11:41:04 2013 +0200| [720a1de52fb4abd8e0541cdcc7d57cb0044c7d3a] | committer: Anton Khirnov

lavc: free the padded last frame during audio encoding properly

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=720a1de52fb4abd8e0541cdcc7d57cb0044c7d3a
---

 libavcodec/utils.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 3dddafc..ee0b571 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -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;
 }



More information about the ffmpeg-cvslog mailing list