diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-11-17 15:16:01 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-12-08 17:51:47 +0100 |
commit | 12ace68ab0f07b8049dd9807dd9ea302187bd44b (patch) | |
tree | 30dc5d5436968df0909e8341a589f9189905d908 /libavcodec | |
parent | 117575ae2622d3a42af43f76a1940239c8088292 (diff) | |
download | ffmpeg-12ace68ab0f07b8049dd9807dd9ea302187bd44b.tar.gz |
avcodec/mpegaudiotab: Avoid unused entry in table
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mpegaudiodec_template.c | 6 | ||||
-rw-r--r-- | libavcodec/mpegaudiodectab.h | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/libavcodec/mpegaudiodec_template.c b/libavcodec/mpegaudiodec_template.c index 53db13d0d4..88679723fc 100644 --- a/libavcodec/mpegaudiodec_template.c +++ b/libavcodec/mpegaudiodec_template.c @@ -100,7 +100,7 @@ typedef struct MPADecodeContext { /* vlc structure for decoding layer 3 huffman tables */ static VLC huff_vlc[16]; static VLC_TYPE huff_vlc_tables[ - 0 + 128 + 128 + 128 + 130 + 128 + 154 + 166 + + 128 + 128 + 128 + 130 + 128 + 154 + 166 + 142 + 204 + 190 + 170 + 542 + 460 + 662 + 414 ][2]; static VLC huff_quad_vlc[2]; @@ -286,7 +286,7 @@ static av_cold void decode_init_static(void) /* huffman decode tables */ offset = 0; - for (i = 1; i < 16; i++) { + for (int i = 0; i < 15;) { const HuffTable *h = &mpa_huff_tables[i]; int xsize, x, y; uint8_t tmp_bits [512] = { 0 }; @@ -303,7 +303,7 @@ static av_cold void decode_init_static(void) } /* XXX: fail test */ - huff_vlc[i].table = huff_vlc_tables+offset; + huff_vlc[++i].table = huff_vlc_tables + offset; huff_vlc[i].table_allocated = FF_ARRAY_ELEMS(huff_vlc_tables) - offset; init_vlc(&huff_vlc[i], 7, 512, tmp_bits, 1, 1, tmp_codes, 2, 2, diff --git a/libavcodec/mpegaudiodectab.h b/libavcodec/mpegaudiodectab.h index accd12b8e2..e1468c5e89 100644 --- a/libavcodec/mpegaudiodectab.h +++ b/libavcodec/mpegaudiodectab.h @@ -502,8 +502,7 @@ static const uint8_t mpa_huffbits_24[256] = { 7, 7, 7, 8, 8, 8, 8, 4, }; -static const HuffTable mpa_huff_tables[16] = { -{ 1, NULL, NULL }, +static const HuffTable mpa_huff_tables[] = { { 2, mpa_huffbits_1, mpa_huffcodes_1 }, { 3, mpa_huffbits_2, mpa_huffcodes_2 }, { 3, mpa_huffbits_3, mpa_huffcodes_3 }, |