From c084a975aa13eb1d0161f36a06051a9b2d4abb83 Mon Sep 17 00:00:00 2001
From: Anton Khirnov <anton@khirnov.net>
Date: Mon, 24 Sep 2012 07:17:13 +0200
Subject: [PATCH] lavc: use av_mallocz to allocate AVFrames.

Otherwise the frame is uninitialized, so avcodec_get_frame_defaults()
cannot determine whether to free extended_data.
---
 libavcodec/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 7ef858153b6..a3ab1344aa5 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -645,7 +645,7 @@ void avcodec_get_frame_defaults(AVFrame *frame)
 
 AVFrame *avcodec_alloc_frame(void)
 {
-    AVFrame *frame = av_malloc(sizeof(AVFrame));
+    AVFrame *frame = av_mallocz(sizeof(AVFrame));
 
     if (frame == NULL)
         return NULL;
-- 
GitLab