[FFmpeg-devel] [PATCH 2/3] avformat/paf: Do not zero allocated tables which are immedeately filled

Michael Niedermayer michael at niedermayer.cc
Wed Jan 20 01:32:22 EET 2021


Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavformat/paf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavformat/paf.c b/libavformat/paf.c
index 9587111643..bcd6213a45 100644
--- a/libavformat/paf.c
+++ b/libavformat/paf.c
@@ -149,11 +149,11 @@ static int read_header(AVFormatContext *s)
         p->frame_blks     > INT_MAX / sizeof(uint32_t))
         return AVERROR_INVALIDDATA;
 
-    p->blocks_count_table  = av_mallocz(p->nb_frames *
+    p->blocks_count_table  = av_malloc(p->nb_frames *
                                         sizeof(*p->blocks_count_table));
-    p->frames_offset_table = av_mallocz(p->nb_frames *
+    p->frames_offset_table = av_malloc(p->nb_frames *
                                         sizeof(*p->frames_offset_table));
-    p->blocks_offset_table = av_mallocz(p->frame_blks *
+    p->blocks_offset_table = av_malloc(p->frame_blks *
                                         sizeof(*p->blocks_offset_table));
 
     p->video_size  = p->max_video_blks * p->buffer_size;
-- 
2.17.1



More information about the ffmpeg-devel mailing list