The file might be replaced between open() and stat(). Spotted by Mans. Originally committed as revision 26075 to svn://svn.ffmpeg.org/ffmpeg/trunk