From patchwork Wed Sep 11 19:07:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51524 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:612c:14c:b0:48e:c0f8:d0de with SMTP id h12csp507899vqi; Wed, 11 Sep 2024 12:08:13 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXQ0iYE6mJvGhOrIOJqBE94tBsnMhNu1M2tWC1VU0N2lJZc8KYw3B47xJxQbNot8nmx04hFzH5b5U5836XG+9+s@gmail.com X-Google-Smtp-Source: AGHT+IG/6LwBcXonfHBZH6R8mH8kwoeqTkk0ew42WUChVBAm7La2lQifZ8JCz0C0SVXuv7TgLJIe X-Received: by 2002:a17:907:3d8e:b0:a8d:2623:dd19 with SMTP id a640c23a62f3a-a902966809fmr14486266b.14.1726081693591; Wed, 11 Sep 2024 12:08:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726081693; cv=none; d=google.com; s=arc-20240605; b=Vsz7NFqbsPaFHo7LxT/8gSfp7WNPY8O5jjGT1RKlXfWkLAnYWkXbzDWrJHjXIbzm2u ROs4DdglyoZIjDAVOk3ZyJbzlRvk26w4eiyaW4R+5tNXTSd9tD6mDf87qKHpOIeKE4pN N/nz6b6YKwmvCf9ELbdkmV18efVp9eGY5+pg4lWqII1XNM1v6Uoy12u2dcl+vNKpsVsD 1bIo7r80w2Oh4F/GH7YV90HZT63mIPX0hgeXSnDfoagVbAZ+jMStTOcMwPnJm9XDLbYd Qr/mMB/K15q2Dzsrhv0Mxm2g1Xyjy2YAwBg4AK+IcCbTZmL/lPPU2alD5c6zoVurkxIg XtYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:dkim-signature :delivered-to; bh=YumAXReXR63qPmJFSzICaq0xlVhJcmg37c/Bn200Ay4=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=Aszz/Y5zLbQp5tnoa7o7ROl3fnsgygTASyzfbv/NnOwBP+cIzx52uhjePCvhHRMkUO luYgwzlHCFa+p6C0hmRE90U1ZTEPpae9LcdvvoiZXpVX0FjOLkrJLBU4Nls8TMI/lCag OEPx/z6afsaRp0m3R5HuQ1j5sicXpk8WKkwwVJi0O83bQXfOa4utRV8izoznU6+LCL90 lokeOwKk8QyXyi4lGCh6wQ3k916XVJtoRHeIadAx715Dy8Xeo0iM9KQyA2OXqQpAJJwJ ojQ3MUBnvahVVNJdV7Xx7cQMzHN7HOTtf0Ji9vhGjXam1UV0qzsJ3OUWjbT8Aow0u8KB 6l4A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=daJH1uIe; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a8d2584c9dfsi742837866b.95.2024.09.11.12.08.13; Wed, 11 Sep 2024 12:08:13 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=daJH1uIe; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C274A68E302; Wed, 11 Sep 2024 22:08:09 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7585E68DE8B for ; Wed, 11 Sep 2024 22:08:02 +0300 (EEST) Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-37747c1d928so142693f8f.1 for ; Wed, 11 Sep 2024 12:08:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726081682; x=1726686482; darn=ffmpeg.org; h=subject:date:from:to:message-id:from:to:cc:subject:date:message-id :reply-to; bh=hJS25OFhCkQlbB3Y7GunVDVvpPPpY06vX99gauY1ZtI=; b=daJH1uIeBFw5nDEqlmu+YVSubVZ5jrcMzMnQf1J/YOwjFg0VKiMgH1Rtkdf2CW5kp7 srRztN4KrN3Ng6pCVBUJ5azCh89AlSzq+YlZF5jxjaASSVtoJ9W8zAv3EGD2ID6FWaFe M9w9CdCnO+Jw5M3CqXKKWNM0mEZM8uhLNcW5BCpqbeeEpnHQkh5icmwFWzCCyb2FMni2 A3iY772rwpYP437a9rYleXkf+Z+Jq39InXbETod7EOGDFS9kO+4EzJdcrDkAsuq5XVq6 80cmQAr3xiwC2vsdCaYhqh6WvYCry+8USFtcbqPlZwj1tLsROpfyBDaLw4+URZcvZ5kU /H2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726081682; x=1726686482; h=subject:date:from:to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hJS25OFhCkQlbB3Y7GunVDVvpPPpY06vX99gauY1ZtI=; b=kdO6dwV/RTwgk3AL/ZVpecfw88S3RsdIr8Hl9ypVYI1+95+QIvFhGjGzWvKSeXaQ6g nWABJtB63VbBHMbu7r2GATwcaAo2DL04VoM/DeZ6mjw/slTerxzoXbS+hxbdzzb7l6aN vLsFHlo1ccbzMs3/3ARxRwXv48UJHUIQWBScPZWDASzZLjbOncledQ9H10v7uUiA/pYk pnjqiozls6TCezxbWFTMg21PN4CO+7OwdU/lim+NNzAracDRSRKtKC5W3uu8QnF+puLm vjfCbzBNnCBnRjFAkyop8PWfb4Bok8AzLwh65IsGtP560oQrtEISjTh2bY/NtfmMCxqP wVNA== X-Gm-Message-State: AOJu0YwmqNTDePrpKv4GDSRUvRP1hnuiMScQ18mcHvxfEhM0aQljLxgk 8WAIbCSnQCm+GidisZCeh3eGpwkItAvL+bz/E7ycU+edPV3DQ46tbtCcdA== X-Received: by 2002:a5d:5302:0:b0:371:8cd6:b2c1 with SMTP id ffacd0b85a97d-378c2d54968mr105346f8f.48.1726081680753; Wed, 11 Sep 2024 12:08:00 -0700 (PDT) Received: from localhost (p200300cccf02610095985936ed6545e5.dip0.t-ipconnect.de. [2003:cc:cf02:6100:9598:5936:ed65:45e5]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895665649sm12307099f8f.42.2024.09.11.12.07.59 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Sep 2024 12:08:00 -0700 (PDT) Message-Id: To: From: "Marvin Scholz" Date: Wed, 11 Sep 2024 21:07:29 +0200 Subject: [FFmpeg-devel] [PATCH] lavfi/af_channelmap: fix channelmap_init error handling 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Q14+Q2XMzFtI The channelmap_init function was returning success even on error after 7dc81d33c241b9e176ea85956e8317f29bc9e3c0 due to shadowing of the outer ret variable. Fixes CID1619297 Logically dead code --- libavfilter/af_channelmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: a15d2fdfd96c0ce711e0be3fe6c2f47b5a39b931 diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c index f5209a10cd..7a99ac7780 100644 --- a/libavfilter/af_channelmap.c +++ b/libavfilter/af_channelmap.c @@ -316,7 +316,7 @@ static av_cold int channelmap_init(AVFilterContext *ctx) presence_map = av_calloc(s->nch, sizeof(*presence_map)); for (i = 0; i < s->nch; i++) { const int out_idx = s->map[i].out_channel_idx; - int ret = check_idx_and_id(ctx, out_idx, s->map[i].out_channel, &s->output_layout, "out"); + ret = check_idx_and_id(ctx, out_idx, s->map[i].out_channel, &s->output_layout, "out"); if (ret < 0) break; if (presence_map[out_idx]) {