[FFmpeg-devel] [PATCH 09/11] avcodec/aac/aacdec_lpd: Remove dead code

Michael Niedermayer michael at niedermayer.cc
Mon Jul 1 02:12:48 EEST 2024


I dont intend to apply this, this patch is just to show there is dead code
that needs more work in case it has been forgotten

I will mark this as intentional in coverity because obviously its work in progress code
(CID1603198 Logically dead code)

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavcodec/aac/aacdec_lpd.c | 22 +---------------------
 1 file changed, 1 insertion(+), 21 deletions(-)

diff --git a/libavcodec/aac/aacdec_lpd.c b/libavcodec/aac/aacdec_lpd.c
index 91a32688895..1faaab852f9 100644
--- a/libavcodec/aac/aacdec_lpd.c
+++ b/libavcodec/aac/aacdec_lpd.c
@@ -142,7 +142,6 @@ int ff_aac_parse_fac_data(AACUsacElemData *ce, GetBitContext *gb,
 int ff_aac_ldp_parse_channel_stream(AACDecContext *ac, AACUSACConfig *usac,
                                     AACUsacElemData *ce, GetBitContext *gb)
 {
-    int k;
     const uint8_t *mod;
     int first_ldp_flag;
 
@@ -159,26 +158,7 @@ int ff_aac_ldp_parse_channel_stream(AACDecContext *ac, AACUSACConfig *usac,
     if (first_ldp_flag)
         ce->ldp.last_lpd_mode = -1; /* last_ldp_mode is a **STATEFUL** value */
 
-    k = 0;
-    while (k < 0) {
-        if (!k) {
-            if (ce->ldp.core_mode_last && ce->ldp.fac_data_present)
-                ff_aac_parse_fac_data(ce, gb, 0, usac->core_frame_len/8);
-        } else {
-            if (!ce->ldp.last_lpd_mode && mod[k] > 0 ||
-                ce->ldp.last_lpd_mode && !mod[k])
-                ff_aac_parse_fac_data(ce, gb, 0, usac->core_frame_len/8);
-        }
-        if (!mod[k]) {
-//            parse_acelp_coding();
-            ce->ldp.last_lpd_mode = 0;
-            k++;
-        } else {
-//            parse_tcx_coding();
-            ce->ldp.last_lpd_mode = mod[k];
-            k += (1 << (mod[k] - 1));
-        }
-    }
+
 
 //    parse_lpc_data(first_lpd_flag);
 
-- 
2.45.2



More information about the ffmpeg-devel mailing list