Fix an underflow/overflow that was causing some crackles when playing
certain THP files.
patch by Marco Gerards, mgerards xs4all nl

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