and found by reimar) fix is from reimar + cosmetics by me. Originally committed as revision 14069 to svn://svn.ffmpeg.org/ffmpeg/trunk