featuring some help from Alexander Strasser Originally committed as revision 4959 to svn://svn.ffmpeg.org/ffmpeg/trunk