diff alsdec.c @ 11963:74c0478534cf libavcodec

alsdec: convert VLAs to fixed size The maximum value of sub_blocks is 8, a safe size to always allocate on stack.
author mru
date Sat, 26 Jun 2010 14:34:18 +0000
parents 7dd2a45249a9
children ebef2d6d5a8e
line wrap: on
line diff
--- a/alsdec.c	Sat Jun 26 14:34:15 2010 +0000
+++ b/alsdec.c	Sat Jun 26 14:34:18 2010 +0000
@@ -734,8 +734,8 @@
 
     // 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;