aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/atrac9dec.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-11-04 05:33:33 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-11-24 11:35:03 +0100
commit4a9ffce91cef3c56d34db7f5966c1b48241a2536 (patch)
treed4aa9fcced1cd329ef5ff6b2c94d0a007188b5c2 /libavcodec/atrac9dec.c
parent92209cf4c9be74197a1585e656443fedf215b344 (diff)
downloadffmpeg-4a9ffce91cef3c56d34db7f5966c1b48241a2536.tar.gz
avcodec/atrac9dec: Use least max_depth in calls to get_vlc2()
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/atrac9dec.c')
-rw-r--r--libavcodec/atrac9dec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/atrac9dec.c b/libavcodec/atrac9dec.c
index a1af3c22ef..ecf95f1777 100644
--- a/libavcodec/atrac9dec.c
+++ b/libavcodec/atrac9dec.c
@@ -272,7 +272,7 @@ static inline int read_scalefactors(ATRAC9Context *s, ATRAC9BlockData *b,
c->scalefactors[0] = get_bits(gb, len);
for (int i = 1; i < b->band_ext_q_unit; i++) {
- int val = c->scalefactors[i - 1] + get_vlc2(gb, tab->table, 9, 2);
+ int val = c->scalefactors[i - 1] + get_vlc2(gb, tab->table, 9, 1);
c->scalefactors[i] = val & ((1 << len) - 1);
}
@@ -302,7 +302,7 @@ static inline int read_scalefactors(ATRAC9Context *s, ATRAC9BlockData *b,
const VLC *tab = &s->sf_vlc[1][len];
for (int i = 0; i < unit_cnt; i++) {
- int dist = get_vlc2(gb, tab->table, 9, 2);
+ int dist = get_vlc2(gb, tab->table, 9, 1);
c->scalefactors[i] = baseline[i] + dist;
}
@@ -325,7 +325,7 @@ static inline int read_scalefactors(ATRAC9Context *s, ATRAC9BlockData *b,
c->scalefactors[0] = get_bits(gb, len);
for (int i = 1; i < unit_cnt; i++) {
- int val = c->scalefactors[i - 1] + get_vlc2(gb, tab->table, 9, 2);
+ int val = c->scalefactors[i - 1] + get_vlc2(gb, tab->table, 9, 1);
c->scalefactors[i] = val & ((1 << len) - 1);
}