The libfaad wrapper does this. Originally committed as revision 22206 to svn://svn.ffmpeg.org/ffmpeg/trunk