]> git.sesse.net Git - vlc/commit
aout_BufferAlloc() : remove stack allocation
authorRafaël Carré <rafael.carre@gmail.com>
Thu, 3 Sep 2009 13:03:07 +0000 (15:03 +0200)
committerRafaël Carré <rafael.carre@gmail.com>
Thu, 3 Sep 2009 13:03:07 +0000 (15:03 +0200)
commitf76500382dc059091e0d811ed55a22337d2fe04f
treee6e2f188ac7fde9644ed4a9af0a0295fb052d94a
parent6efc8da001c90f46d2b91a09dc57dedd59a5415c
aout_BufferAlloc() : remove stack allocation

alloca() was not used anyway on OSX and BSD, due to smaller stack sizes,
and we can't assume a default stack size anyway

I expect the performance loss to be minimal, but worth the code
simplification anyway (i didn't benchmark)

aout_BufferAlloc() is moved into its own function in a .c file instead
of being a macro

Since there is now 2 types of allocations (HEAP and NONE), make
i_alloc_type a boolean (true = HEAP alloc, false = NO alloc)

make aout_BufferFree() a static inline function in the same process.
Prototype doesn't change since the provided buffer doesn't need to be
set to NULL (I checked all the callers)
include/vlc_aout.h
modules/audio_mixer/spdif.c
src/audio_output/aout_internal.h
src/audio_output/common.c
src/audio_output/dec.c
src/audio_output/filters.c
src/audio_output/input.c
src/audio_output/mixer.c
src/audio_output/output.c