diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2025-03-14 02:31:51 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2025-03-17 03:26:07 +0100 |
commit | be7642b198c51e65dc7a1fc4ff1f68d29cd6dc54 (patch) | |
tree | 6d4500b163c429c34b1edbc6ad186117b6bd4154 /libavcodec/vorbisdec.c | |
parent | c228ae2b4051c5410847f0e94842d8e307b787f5 (diff) | |
download | ffmpeg-be7642b198c51e65dc7a1fc4ff1f68d29cd6dc54.tar.gz |
avcodec/qdm2, vorbisdec: Use compile-time const max_depth in get_vlc2
It makes no sense to try to be exact with max depth
in get_vlc2(): It will mean that the compiler emits code
for all three stages of parsing and runtime checks for
whether max_depth is big enough to parse the next stage
when a not yet complete code has been encountered.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/vorbisdec.c')
-rw-r--r-- | libavcodec/vorbisdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c index 11111e7eb3..a778dc6b58 100644 --- a/libavcodec/vorbisdec.c +++ b/libavcodec/vorbisdec.c @@ -1150,7 +1150,7 @@ static int vorbis_floor0_decode(vorbis_context *vc, ff_dlog(NULL, "floor0 dec: maximum depth: %d\n", codebook.maxdepth); /* read temp vector */ vec_off = get_vlc2(&vc->gb, codebook.vlc.table, - codebook.nb_bits, codebook.maxdepth); + codebook.nb_bits, 3); if (vec_off < 0) return AVERROR_INVALIDDATA; vec_off *= codebook.dimensions; |