Check return value of get_chunk_header(). Since enum can be unsigned, the
current code wouldn't always error out on errors.

Based on patch by Stephen d'Angelo <sdangelo evertz com>.

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