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 C4663483EB for ; Sun, 30 Jun 2024 23:14:43 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 106DB68D748; Mon, 1 Jul 2024 02:13:40 +0300 (EEST) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DD53968D6CB for ; Mon, 1 Jul 2024 02:13:17 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 3ED6EFF802 for ; Sun, 30 Jun 2024 23:13:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1719789197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=APG9JGxC9WXlY4qAxTm5y3VqL8MX5nQD65DCIwW0dyQ=; b=fpdID7hSYS9N5bWGMJlqq017VN3JiF0iYwHXo4ygi5hX/lgH0zQ984x6cZXQMJY56TE3/k gEikNPg8/s95zADnSErtFtM0ET7BOT0XWyww18bM0vH62nBj/03N3rKqJElxIatUC3KMy0 nxhI+guEWX2etN4W8GDoPIOZoAsfwVLlrMsWwpg0z2IkbpsELU6kfjYxxD2Bu3wMGs/Yau dD0KUDkI5KqCqet+lbD4XotoGzzeJoFG2rvHUZ2ZoAhB+NY1fne22c7EtnEG/YDueKf/6B I/9jPwNzY7J3ZP2wzr0mDatdfekCftZfw4oQFQh1NEQblZwPG3azrhyx4KpbAw== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 1 Jul 2024 01:12:49 +0200 Message-ID: <20240630231306.3779027-10-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240630231306.3779027-1-michael@niedermayer.cc> References: <20240630231306.3779027-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 10/11] avcodec/aac/aacdec_usac: Avoid doing the same thing twice each iteration 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: This requires review by the author of the code, i have just changed this so it looks plausible, this needs to be checked against the spec Fixes: CID1603194 Logically dead code Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavcodec/aac/aacdec_usac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/aac/aacdec_usac.c b/libavcodec/aac/aacdec_usac.c index 4856c1786b7..9587348021e 100644 --- a/libavcodec/aac/aacdec_usac.c +++ b/libavcodec/aac/aacdec_usac.c @@ -313,12 +313,12 @@ int ff_aac_usac_reset_state(AACDecContext *ac, OutputConfiguration *oc) ff_aac_sbr_config_usac(ac, che, e); for (int j = 0; j < ch; j++) { - SingleChannelElement *sce = &che->ch[ch]; + SingleChannelElement *sce = &che->ch[j]; AACUsacElemData *ue = &sce->ue; memset(ue, 0, sizeof(*ue)); - if (!ch) + if (!j) ue->noise.seed = 0x3039; else che->ch[1].ue.noise.seed = 0x10932; -- 2.45.2 _______________________________________________ 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".