Bug 1144107 - Part 2: Prevent uin32_t overflow. r=kentuckyfriedtakahe

This commit is contained in:
Jean-Yves Avenard 2015-07-14 09:21:27 -04:00
parent 03d7a25152
commit 76090b241e

View File

@ -4129,8 +4129,8 @@ Vector<MediaSource::Indice> MPEG4Source::exportIndex()
indice.start_composition = (compositionTime * 1000000ll) / mTimescale;
// end_composition is overwritten everywhere except the last frame, where
// the presentation duration is equal to the sample duration.
indice.end_composition = ((compositionTime + duration) * 1000000ll) /
mTimescale;
indice.end_composition =
(compositionTime * 1000000ll + duration * 1000000ll) / mTimescale;
indice.sync = isSyncSample;
index.add(indice);
}