[FFmpeg-cvslog] avcodec_encode_audio(): fix invalid free

Rafaël Carré git at videolan.org
Wed Oct 17 14:21:54 CEST 2012


ffmpeg | branch: master | Rafaël Carré <funman at videolan.org> | Mon Oct 15 18:41:55 2012 +0200| [a25d912dca9cd553440167e0476c47581359c0fc] | committer: Anton Khirnov

avcodec_encode_audio(): fix invalid free

Since 2bc0de385, AVFrame needs to be initialized
before calling avcodec_get_frame_defaults().

Signed-off-by: Anton Khirnov <anton at khirnov.net>

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

 libavcodec/utils.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index bb99a5a..836d953 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1073,7 +1073,7 @@ int attribute_align_arg avcodec_encode_audio(AVCodecContext *avctx,
                                              const short *samples)
 {
     AVPacket pkt;
-    AVFrame frame0;
+    AVFrame frame0 = { 0 };
     AVFrame *frame;
     int ret, samples_size, got_packet;
 



More information about the ffmpeg-cvslog mailing list