Avoid a possible overflow when reading Nikon avi files.

Suggested-by: Reimar