Skip to content
Snippets Groups Projects
Commit 17253f59 authored by Måns Rullgård's avatar Måns Rullgård
Browse files

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
parent 70f2314d
No related branches found
No related tags found
No related merge requests found
...@@ -734,8 +734,8 @@ static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd) ...@@ -734,8 +734,8 @@ static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd)
// read all residuals // read all residuals
if (sconf->bgmc) { if (sconf->bgmc) {
unsigned int delta[sub_blocks]; unsigned int delta[8];
unsigned int k [sub_blocks]; unsigned int k [8];
unsigned int b = av_clip((av_ceil_log2(bd->block_length) - 3) >> 1, 0, 5); unsigned int b = av_clip((av_ceil_log2(bd->block_length) - 3) >> 1, 0, 5);
unsigned int i = start; unsigned int i = start;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment