Make sure we dont read over the end.
Fixes issue1237.

backport r19322 by michael


Originally committed as revision 22074 to svn://svn.ffmpeg.org/ffmpeg/branches/0.5
1 file changed