fixed buffer allocation logic (hopefully) so that decoder does not crash
most ffmpeg-enabled apps; added a bunch on motion compensation stuff
which is effectively disabled at the moment while details are worked out

Originally committed as revision 1840 to svn://svn.ffmpeg.org/ffmpeg/trunk
