From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 7F50246991 for ; Thu, 29 Jun 2023 22:46:55 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8281468C373; Fri, 30 Jun 2023 01:46:54 +0300 (EEST) Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com [209.85.167.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0B1BD68C0F7 for ; Fri, 30 Jun 2023 01:46:48 +0300 (EEST) Received: by mail-oi1-f179.google.com with SMTP id 5614622812f47-3a36803f667so803612b6e.0 for ; Thu, 29 Jun 2023 15:46:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688078806; x=1690670806; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=J6+GpKnSRLUhBw4PTt2Kn0wSyCsjrFp9P7YiV5zOOoA=; b=BW3uIIgkB6lH56j0yhxMcUPqBksIdDlfeFc2J9Eg/NkA7JjtlbziK3o5CRYEErhSKe ng4EL/NVMR9AvEXSzNewZ8jZfZlShEONB/OkUnxQFtg/3eX8mX2Mr7/VTuW/Ld808GZ3 Qi5LcvDEs+cbkVGFWtWZpACMffF7vJMWZjVWunl0JESDsPUpDMiN7SUfNc3hS/aF535u P9gjKlqkPf+Wh8pG/QMXWc84Nv0iDsTdwZtLNBOTSMvXukbpyo/ufkavrEujwitMJm44 6yjT5QmO/CCdwtcsQUMDJ4K4udrMuo8P7oDQbdNibK36ahQ4NmdJn4jGxQH039jThQRE X02w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688078806; x=1690670806; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=J6+GpKnSRLUhBw4PTt2Kn0wSyCsjrFp9P7YiV5zOOoA=; b=JFC41PokBa0cfq20oUU7mSS8bdSvsa4n887umF73aK44U3wZc+GWSZPHo10IscohD8 ADhKzto3bZv44icvnv9fjCrwfjIHFXw2kC6lthmib4DbEI20nnOqxH4bBg3jaLNo0SsI YefLw8UF4XRQVGDcDibD8guNvAw5jCAQ48QAgcrxLw+UO3qoBXTCSTlG0GvunQNSoOMF 9oRG25YV0lMW0xXOYNnlbq3NyHdV5tyYycpgC148xCxbI+GgZ+SvHBzcqY1WspCbsmF+ 1L5QiAgu7dtNUw8f1Qc3+Wc4TkTSmEuBbZoxjLgCM5bS2N/aFEZAxo6v35kj8/WcqO2l tBGw== X-Gm-Message-State: AC+VfDyDgTMYnSZzJlH+ZhPwMU5xfqJuujS31coDDdgiG2VhdzzH0FLF hiwrr8sMVmKBYwxYdlGEsMfRPRCUVCM= X-Google-Smtp-Source: ACHHUZ5wZPwlBLyL/EcnYusi/eYCJNDG5ktgmnjmZhIXLJuP39rYpZ543UVaj9dRhtqnPXB9Y3W5Kw== X-Received: by 2002:aca:3254:0:b0:3a0:5420:700b with SMTP id y81-20020aca3254000000b003a05420700bmr3246663oiy.28.1688078806289; Thu, 29 Jun 2023 15:46:46 -0700 (PDT) Received: from [192.168.0.12] (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id j5-20020a4adf45000000b0056351d2841asm3879466oou.20.2023.06.29.15.46.45 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 29 Jun 2023 15:46:46 -0700 (PDT) Message-ID: Date: Thu, 29 Jun 2023 19:46:50 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: From: James Almer In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH] avcodec/evc_ps: Replace av_malloc+memset by av_mallocz X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 6/29/2023 7:28 PM, Andreas Rheinhardt wrote: > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/evc_ps.c | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/libavcodec/evc_ps.c b/libavcodec/evc_ps.c > index ec405345ae..fc2105b352 100644 > --- a/libavcodec/evc_ps.c > +++ b/libavcodec/evc_ps.c > @@ -143,12 +143,10 @@ int ff_evc_parse_sps(GetBitContext *gb, EVCParamSets *ps) > if (sps_seq_parameter_set_id >= EVC_MAX_SPS_COUNT) > return AVERROR_INVALIDDATA; > > - sps = av_malloc(sizeof(*sps)); > + sps = av_mallocz(sizeof(*sps)); > if (!sps) > return AVERROR(ENOMEM); > > - memset(sps, 0, sizeof(*sps)); > - > sps->sps_seq_parameter_set_id = sps_seq_parameter_set_id; > > // the Baseline profile is indicated by profile_idc eqal to 0 > @@ -318,12 +316,10 @@ int ff_evc_parse_pps(GetBitContext *gb, EVCParamSets *ps) > if (pps_pic_parameter_set_id >= EVC_MAX_PPS_COUNT) > return AVERROR_INVALIDDATA; > > - pps = av_malloc(sizeof(*pps)); > + pps = av_mallocz(sizeof(*pps)); > if (!pps) > return AVERROR(ENOMEM); > > - memset(pps, 0, sizeof(*pps)); > - > pps->pps_pic_parameter_set_id = pps_pic_parameter_set_id; > > pps->pps_seq_parameter_set_id = get_ue_golomb(gb); LGTM. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".