diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/codecs/libwma/wmadeci.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/codecs/libwma/wmadeci.c b/apps/codecs/libwma/wmadeci.c index d81b93ffe3..5a03a0a59c 100644 --- a/apps/codecs/libwma/wmadeci.c +++ b/apps/codecs/libwma/wmadeci.c | |||
@@ -48,7 +48,7 @@ fixed32 stat0[2048], stat1[1024], stat2[512], stat3[256], stat4[128]; | |||
48 | uint16_t *runtabarray[2], *levtabarray[2]; | 48 | uint16_t *runtabarray[2], *levtabarray[2]; |
49 | 49 | ||
50 | /*these could be made smaller since only one can be 1336*/ | 50 | /*these could be made smaller since only one can be 1336*/ |
51 | uint16_t runtab0[1336], runtab1[1336], levtab0[1336], levtab1[1336]; | 51 | uint16_t runtab_big[1336], runtab_small[1072], levtab_big[1336], levtab_small[1072]; |
52 | 52 | ||
53 | #define VLCBUF1SIZE 4598 | 53 | #define VLCBUF1SIZE 4598 |
54 | #define VLCBUF2SIZE 3574 | 54 | #define VLCBUF2SIZE 3574 |
@@ -546,8 +546,10 @@ int wma_decode_init(WMADecodeContext* s, asf_waveformatex_t *wfx) | |||
546 | coef_vlc_table = 1; | 546 | coef_vlc_table = 1; |
547 | } | 547 | } |
548 | 548 | ||
549 | runtabarray[0] = runtab0; runtabarray[1] = runtab1; | 549 | /* since the coef2 table is the biggest and that has index 2 in coef_vlcs |
550 | levtabarray[0] = levtab0; levtabarray[1] = levtab1; | 550 | it's safe to always assign like this */ |
551 | runtabarray[0] = runtab_big; runtabarray[1] = runtab_small; | ||
552 | levtabarray[0] = levtab_big; levtabarray[1] = levtab_small; | ||
551 | 553 | ||
552 | s->coef_vlc[0].table = vlcbuf1; | 554 | s->coef_vlc[0].table = vlcbuf1; |
553 | s->coef_vlc[0].table_allocated = VLCBUF1SIZE; | 555 | s->coef_vlc[0].table_allocated = VLCBUF1SIZE; |