title: what is "stack alignment"?
body: <p>What is stack alignment? 
  Why is it used? 
  Can it be controlled by compiler settings?</p>
  
  <p>The details of this question are taken from a problem faced when trying to use ffmpeg libraries with msvc, however what I'm really interested in is an explanation of what is "stack alignment".</p>
  
  <p>The Details:</p>
  
  <ul>
  <li>When runnig my msvc complied program which links to avcodec I get the
  following error: "Compiler did not align stack variables. Libavcodec has
  been miscompiled", followed by a crash in avcodec.dll. </li>
  <li>avcodec.dll was not compiled with msvc, so I'm unable to see what is going on inside.</li>
  <li>When running ffmpeg.exe and using the same avcodec.dll everything works well. </li>
  <li>ffmpeg.exe was not compiled with msvc, it was complied with gcc / mingw (same as avcodec.dll)</li>
  </ul>
  
  <p>Thanks,</p>
  
  <p>Dan</p>