Fix an infinite loop when parsing MP4 files.

Fixes #478.