[Ffmpeg-devel] about ff_check_alignment()

Uoti Urpala uoti.urpala
Tue Jan 30 14:53:55 CET 2007

On Tue, 2007-01-30 at 14:07 +0100, Guillaume Poirier wrote:
> The problem arises on "strange setups"/OS, I think it's on MinGW,
> where if you use a libav* lib from a 3rd party program, you don't have
> the guarantee that the stack is properly aligned.
> Newer version of GCC have the ability to re-align the stack properly.
> The archives have all the details.

GCC 4.1 aligns stack variables properly with respect to stack frames,
which some older versions didn't do. Newer versions have a function
attribute to generate extra code to realign the stack itself (so that
stack _frames_ begin at aligned boundaries) when entering the function.
However if I remember correctly FFmpeg does NOT currently use that
attribute for any functions that might be called "from outside in
strange setups". What other feature is there that would help with the
current code? I don't remember any being mentioned on the list before.
Or did you refer to "the archives" without reading them yourself?

More information about the ffmpeg-devel mailing list