mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Bug 1845350
- Prevent a division by zero when adjusting dts in MoofParser.cpp. r=alwu, a=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D184683
This commit is contained in:
parent
c4904b93c7
commit
91f1f3df37
@ -532,10 +532,15 @@ Moof::Moof(Box& aBox, const TrackParseMode& aTrackParseMode, Trex& aTrex,
|
||||
? decodeOffset.unwrap() + offsetOffset.unwrap()
|
||||
: TimeUnit::Zero(aMvhd.mTimescale);
|
||||
TimeUnit decodeDuration = endDecodeTime - mIndex[0].mDecodeTime;
|
||||
double adjust = !presentationDuration.IsZero()
|
||||
? (double)decodeDuration.ToMicroseconds() /
|
||||
(double)presentationDuration.ToMicroseconds()
|
||||
: 0.;
|
||||
double adjust = 0.;
|
||||
if (!presentationDuration.IsZero()) {
|
||||
double num = decodeDuration.ToSeconds();
|
||||
double denom = presentationDuration.ToSeconds();
|
||||
if (denom != 0.) {
|
||||
adjust = num / denom;
|
||||
}
|
||||
}
|
||||
|
||||
TimeUnit dtsOffset = mIndex[0].mDecodeTime;
|
||||
TimeUnit compositionDuration(0, aMvhd.mTimescale);
|
||||
// Adjust the dts, ensuring that the new adjusted dts will never be
|
||||
|
BIN
dom/media/test/crashtests/1845350.mp4
Normal file
BIN
dom/media/test/crashtests/1845350.mp4
Normal file
Binary file not shown.
@ -166,3 +166,4 @@ load 1833896.mp4
|
||||
load 1833894.mp4
|
||||
load 1835164.html
|
||||
load 1840002.webm
|
||||
load 1845350.mp4
|
||||
|
Loading…
Reference in New Issue
Block a user