Browse Source

alsdec: convert VLAs to fixed size

The maximum value of sub_blocks is 8, a safe size to always allocate on
stack.

Originally committed as revision 23797 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/n0.8
Måns Rullgård 15 years ago
parent
commit
17253f598e
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavcodec/alsdec.c

+ 2
- 2
libavcodec/alsdec.c View File

@@ -734,8 +734,8 @@ static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd)

// read all residuals
if (sconf->bgmc) {
unsigned int delta[sub_blocks];
unsigned int k [sub_blocks];
unsigned int delta[8];
unsigned int k [8];
unsigned int b = av_clip((av_ceil_log2(bd->block_length) - 3) >> 1, 0, 5);
unsigned int i = start;



Loading…
Cancel
Save