Browse Source

avcodec/mpc7, mpc7data: Make overlong arrays smaller

For the VLC table arrays in mpc7_decode_init() this fixes
a regression introduced in 1e40dc920a.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
tags/n4.4
Andreas Rheinhardt 5 years ago
parent
commit
bec4e15859
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      libavcodec/mpc7.c
  2. +1
    -1
      libavcodec/mpc7data.h

+ 2
- 2
libavcodec/mpc7.c View File

@@ -97,10 +97,10 @@ static av_cold int mpc7_decode_init(AVCodecContext * avctx)
&mpc7_scfi[0], 2, 1, 1 << MPC7_SCFI_BITS);
INIT_VLC_STATIC(&dscf_vlc, MPC7_DSCF_BITS, MPC7_DSCF_SIZE,
&mpc7_dscf[1], 2, 1,
&mpc7_dscf[0], 2, 1, 1 << MPC7_DSCF_SIZE);
&mpc7_dscf[0], 2, 1, 1 << MPC7_DSCF_BITS);
INIT_VLC_STATIC(&hdr_vlc, MPC7_HDR_BITS, MPC7_HDR_SIZE,
&mpc7_hdr[1], 2, 1,
&mpc7_hdr[0], 2, 1, 1 << MPC7_HDR_SIZE);
&mpc7_hdr[0], 2, 1, 1 << MPC7_HDR_BITS);
for(i = 0; i < MPC7_QUANT_VLC_TABLES; i++){
for(j = 0; j < 2; j++){
quant_vlc[i][j].table = &quant_tables[quant_offsets[i*2 + j]];


+ 1
- 1
libavcodec/mpc7data.h View File

@@ -51,7 +51,7 @@ static const uint8_t mpc7_hdr[MPC7_HDR_SIZE * 2] = {
};

#define MPC7_QUANT_VLC_TABLES 7
static const uint8_t mpc7_quant_vlc_sizes[MPC7_QUANT_VLC_TABLES * 2] = {
static const uint8_t mpc7_quant_vlc_sizes[MPC7_QUANT_VLC_TABLES] = {
27, 25, 7, 9, 15, 31, 63
};



Loading…
Cancel
Save