aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/wmadec.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-09-26 22:50:41 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-10-31 21:44:48 +0100
commit5615f9dab4e7f911ce8799c34c0ca425b0e2a090 (patch)
treed0e717c4afb84faa16fe432fe1b00d32c9192aaa /libavcodec/wmadec.c
parent7e2120c4d955a99d004a2ac9b690233027fae1fb (diff)
downloadffmpeg-5615f9dab4e7f911ce8799c34c0ca425b0e2a090.tar.gz
avcodec/wmaprodec: Avoid superfluous VLC structures
For all VLCs here, the number of bits of the VLC is write-only, because it is hardcoded at the call site. Therefore one can replace these VLC structures with the only thing that is actually used: The pointer to the VLCElem table. And in most cases one can even avoid this. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/wmadec.c')
-rw-r--r--libavcodec/wmadec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c
index ab48e28ebc..3427e482dc 100644
--- a/libavcodec/wmadec.c
+++ b/libavcodec/wmadec.c
@@ -616,7 +616,7 @@ static int wma_decode_block(WMACodecContext *s)
* there is potentially less energy there */
tindex = (ch == 1 && s->ms_stereo);
memset(ptr, 0, s->block_len * sizeof(WMACoef));
- ret = ff_wma_run_level_decode(s->avctx, &s->gb, &s->coef_vlc[tindex],
+ ret = ff_wma_run_level_decode(s->avctx, &s->gb, s->coef_vlc[tindex].table,
s->level_table[tindex], s->run_table[tindex],
0, ptr, 0, nb_coefs[ch],
s->block_len, s->frame_len_bits, coef_nb_bits);