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 51D5E49800 for ; Mon, 19 Feb 2024 21:57:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E175568D40D; Mon, 19 Feb 2024 23:57:23 +0200 (EET) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 77FF068D26C for ; Mon, 19 Feb 2024 23:57:17 +0200 (EET) Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-6e479be127dso124980b3a.3 for ; Mon, 19 Feb 2024 13:57:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708379835; x=1708984635; darn=ffmpeg.org; 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=9ypTVNGaIUbBIIKQhhJo9foxkrffc13a3SZBu4mxpPA=; b=dboeRw3Qc2bTvFftvArO/mcqNhduwwPy8PIobHHUrJzpBDmFjcQPwJ5D+Tg+ghT2dK p4nMGnHpW+qxnWNOV199+p0lSZUA0+Q4t8UPQGgWn0AUWTVVr+zRYCm53GiCfTlxLtDA pvOG84JcYng7fTxafltLSTG88jTp1UdnfBrquZzeXZ3S3WYHZfurN9MJFFgm+pEbdDfD qvuwCmZW+TGnwZmql3a7E52OM//ZUi/0sZZCHoxl7qzBigxunmB/pGYERPkx6aVlKi/w 6nBs2qBe/2MZPp2KTqAd3fpM2Jd0Jx6cU55W2wC572IOMlXLHVJd3O15l2TVUoSF493p FNSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708379835; x=1708984635; 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=9ypTVNGaIUbBIIKQhhJo9foxkrffc13a3SZBu4mxpPA=; b=qxkbe8LSNa4tz+7Z/TFfDc/DpWssEFOW7/yIhI15G1plXh9OWn4b4ZfMrXYOu1yMb2 UUr8MLFR/Xlr8Zh5/w6NIQkvfG4bjeQLkWrGe0uK9+9r1hllq9OUMq7n6GnXYgixJG4L HeKic8Pz3zb7zD05ESGK4Wz1nb/J+WRIQCCZMO/a/Tyj2X1DZ3/oDBzsHkmWKyNL7nBJ 9SwB7WjImhBaqlwuy/TpTvvKF4CUoVLNGmwIAMFuCEzVQH30IjHfwaYNVclYbu9Q7/NZ lnblZn58FAWATjwMVKSlv6abvrsBEeEZpSStuNCuQFAh34Kdla/tM9nvPzK0TMAnxTCw 5+JA== X-Gm-Message-State: AOJu0YziVgaWID6Ta717WbORof681V2DKa+LcSGLQX9zr/dLpxcllkrz FOb2Au4p30TDsVNxqeOiEZvlfO2F2aGblBcD9/HonKNL/hIe0CHYJW7wi0Bk X-Google-Smtp-Source: AGHT+IGVbIAAAkQoYIi5PwPIQbLZgMUkFTbf+63/vRzl3S36e354VrJ81zbNEUl4StFPYI7qZA0pWA== X-Received: by 2002:a62:d149:0:b0:6e4:6189:e97a with SMTP id t9-20020a62d149000000b006e46189e97amr3419741pfl.15.1708379834866; Mon, 19 Feb 2024 13:57:14 -0800 (PST) Received: from [192.168.0.16] ([190.194.169.124]) by smtp.gmail.com with ESMTPSA id fa19-20020a056a002d1300b006e462d99a9esm2529465pfb.143.2024.02.19.13.57.13 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Feb 2024 13:57:14 -0800 (PST) Message-ID: <8e9b92b1-65cd-4a1e-9446-13d029f63f30@gmail.com> Date: Mon, 19 Feb 2024 18:57:18 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: From: James Almer In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 2/5] avformat/iamf_writer: Remove nonsense check 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 2/19/2024 6:52 PM, Andreas Rheinhardt wrote: > Checking whether a pointer to an element of an array is NULL > makes no sense, as the pointer addition involved in getting > the address would be undefined behaviour already if the array > were NULL. > In this case the array allocation has already been checked > a few lines before. > Fixes Coverity issue #1559548. > > Signed-off-by: Andreas Rheinhardt > --- > libavformat/iamf_writer.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/libavformat/iamf_writer.c b/libavformat/iamf_writer.c > index 897b06310f..e0c47b5e9d 100644 > --- a/libavformat/iamf_writer.c > +++ b/libavformat/iamf_writer.c > @@ -251,8 +251,6 @@ int ff_iamf_add_audio_element(IAMFContext *iamf, const AVStreamGroup *stg, void > int nb_channels = iamf_audio_element->layers[i]->ch_layout.nb_channels; > > IAMFLayer *layer = &audio_element->layers[i]; > - if (!layer) > - return AVERROR(ENOMEM); > memset(layer, 0, sizeof(*layer)); > > if (i) LGTM. I noticed this while rewriting the mp4 implementation, but forgot to deal with it. _______________________________________________ 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".