From patchwork Tue Jan 19 23:32:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 25039 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 3CA1844B8B7 for ; Wed, 20 Jan 2021 01:38:51 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0D896689AA0; Wed, 20 Jan 2021 01:38:51 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe01-2.mx.upcmail.net (vie01a-dmta-pe01-2.mx.upcmail.net [62.179.121.155]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 468466804D5 for ; Wed, 20 Jan 2021 01:38:44 +0200 (EET) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe01.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1l20V2-000ABB-0D for ffmpeg-devel@ffmpeg.org; Wed, 20 Jan 2021 00:33:24 +0100 Received: from localhost ([213.47.68.29]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id 20U4lN575O4rA20U4lPdmw; Wed, 20 Jan 2021 00:32:24 +0100 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.68.29 X-CNFS-Analysis: v=2.3 cv=RNDN4Lq+ c=1 sm=1 tr=0 a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=ruzikYTg6ZPVnYmQRo8A:9 a=pHzHmUro8NiASowvMSCR:22 a=Ew2E2A-JSTLzCXPT_086:22 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Wed, 20 Jan 2021 00:32:22 +0100 Message-Id: <20210119233223.21888-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210119233223.21888-1-michael@niedermayer.cc> References: <20210119233223.21888-1-michael@niedermayer.cc> X-CMAE-Envelope: MS4wfFaUtwesswxzpkpSERfR1ouiAPc2eMgS5GqcfLHHx3wE+f6yazCT4CaauWxj/r+aNVFt7yTHCPel1oDbXTubaVdc/PRtW1lHn6bdOseOWtZ5XgZvz7yG SjyvUo5cv5RoKEZzhc+5yop73g1oD9yJ9ZpsYt4UwEAKD/fRqy69bdAS Subject: [FFmpeg-devel] [PATCH 2/3] avformat/paf: Do not zero allocated tables which are immedeately filled X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Michael Niedermayer --- 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;