[FFmpeg-devel] [PATCH 10/11] avcodec/aac/aacdec_usac: Avoid doing the same thing twice each iteration
Michael Niedermayer
michael at niedermayer.cc
Mon Jul 1 02:12:49 EEST 2024
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 <michael at niedermayer.cc>
---
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
More information about the ffmpeg-devel
mailing list