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

Thilo Borgmann thilo.borgmann
Sun Jun 27 11:58:49 CEST 2010


Am 26.06.10 16:34, schrieb mru:
> 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;

Oh already committed...
I've not recognized this patch on the devel-list before, you could have
pinged me in prior.

Nice work removing these arrays, though!

-Thilo



More information about the ffmpeg-cvslog mailing list