added more error checking, added (and enabled, for the time being) a keyframe-only mode Originally committed as revision 1849 to svn://svn.ffmpeg.org/ffmpeg/trunk