[FFmpeg-cvslog] r23797 - trunk/libavcodec/alsdec.c

mru subversion
Sat Jun 26 16:34:18 CEST 2010


Author: mru
Date: Sat Jun 26 16:34:18 2010
New Revision: 23797

Log:
alsdec: convert VLAs to fixed size

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

Modified:
   trunk/libavcodec/alsdec.c

Modified: trunk/libavcodec/alsdec.c
==============================================================================
--- trunk/libavcodec/alsdec.c	Sat Jun 26 16:34:15 2010	(r23796)
+++ trunk/libavcodec/alsdec.c	Sat Jun 26 16:34:18 2010	(r23797)
@@ -734,8 +734,8 @@ static int read_var_block_data(ALSDecCon
 
     // 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;
 



More information about the ffmpeg-cvslog mailing list