scummvm/scummvm — pull request #550 by bgK (2014-12-20 17:48:06+00:00)
Title: AUDIO: Wrap around in the Timestamp constructor

The Audio::Timestamp(uint s, uint frames, uint fr) constructor would overflow the _numFrames variable, for big enough frame count / framerate couples.

The fix performs the "wrap around" operation that would occur in the "normalize" method directly in the constructor to avoid the integer overflow.

The "making of" video in the Xbox version of Myst III in ResidualVM triggered this bug.