C99 doesn't require EINVAL, only EDOM, EILSEQ, and ERANGE. Originally committed as revision 22530 to svn://svn.ffmpeg.org/ffmpeg/trunk