[FFmpeg-devel] [PATCH] adpcm: convert VLAs to malloc/free

Måns Rullgård mans
Sun Jun 27 03:20:19 CEST 2010

Michael Niedermayer <michaelni at gmx.at> writes:

> On Sun, Jun 27, 2010 at 01:40:38AM +0100, M?ns Rullg?rd wrote:
>> Michael Niedermayer <michaelni at gmx.at> writes:
>> > On Wed, Jun 23, 2010 at 08:49:53PM +0100, Mans Rullgard wrote:
>> >> ---
>> >>  libavcodec/adpcm.c |  136 +++++++++++++++++++++++++++++++---------------------
>> >>  1 files changed, 82 insertions(+), 54 deletions(-)
>> >
>> > mixes functional and cosmetic changes
>> No, moving the structs is necessary.
> that may be but i dont think moving the structs needs the rest of the changes

Well, no.. but splitting this would be just plain silly.  I agree that
indentation changes make the diff harder to read, but not this.

> that said the removial of VLAs here does lead to ugly code ... iam not really
> happy about it.

The code is exactly as ugly as what the compiler has to do otherwise.
What do you suggest instead?  The code as is uses up to 12MB of stack
space, which is more than is normally allocated per thread on a
standard Linux system.  This is clearly not acceptable.

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list