author | JW Wang <jwwang@mozilla.com> |
Tue, 25 Jul 2017 14:34:59 +0800 | |
changeset 371338 | 52ea7b299388407e5277060e78e945af081a37a8 |
parent 371337 | 54f3aaacf9e6064fff4e644d78d40ec9693e5355 |
child 371339 | 7462800fd68e207b2fbd2f6ceed92a896d04f4c4 |
push id | 93049 |
push user | cbook@mozilla.com |
push date | Thu, 27 Jul 2017 09:30:07 +0000 |
treeherder | mozilla-inbound@5e9f7561c2eb [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | cpearce |
bugs | 1382557 |
milestone | 56.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/dom/media/MediaDecoder.cpp +++ b/dom/media/MediaDecoder.cpp @@ -758,16 +758,21 @@ MediaDecoder::MetadataLoaded(UniquePtr<M // Invalidate() will end up calling GetOwner()->UpdateMediaSize with the last // dimensions retrieved from the video frame container. The video frame // container contains more up to date dimensions than aInfo. // So we call Invalidate() after calling GetOwner()->MetadataLoaded to ensure // the media element has the latest dimensions. Invalidate(); EnsureTelemetryReported(); + + // The duration is no longer infinite when we get one from the metadata. + if (mInfo->mMetadataDuration && IsInfinite()) { + SetInfinite(false); + } } void MediaDecoder::EnsureTelemetryReported() { MOZ_ASSERT(NS_IsMainThread()); if (mTelemetryReported || !mInfo) {