summaryrefslogtreecommitdiff
path: root/libavcodec/alsdec.c
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2010-06-26 14:34:18 +0000
committerMåns Rullgård <mans@mansr.com>2010-06-26 14:34:18 +0000
commit17253f598e55ad7e911cc5e33548e3740fad1ef8 (patch)
treedd61174c1c6108b6f8bd592d3c9a1b157dd6358d /libavcodec/alsdec.c
parent70f2314df06e9980b99b66fe07372066a630ae73 (diff)
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
Diffstat (limited to 'libavcodec/alsdec.c')
-rw-r--r--libavcodec/alsdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index 2058a85384..f75398fe9e 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -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;