mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 20:35:50 +00:00
Bug 1382557 - the duration should be finite when we can get one from the metadata. r=cpearce
This fixes the case where ChannelMediaResource::OnStartRequest() calls mCallback->SetInfinite(true) to report an infinite duration, yet later we get another duratoin from the metadata. http://searchfox.org/mozilla-central/rev/8a61c71153a79cda2e1ae7d477564347c607cc5f/dom/media/MediaDecoder.cpp#1179-1185 Note IsInfinite() is checked before other duration sources. We need to call SetInfinite(false) on the MediaDecoder so we can get the correct duration. MozReview-Commit-ID: 3BlFNJzlgXo --HG-- extra : rebase_source : 073b65cbc21f280638054b80f0cc9913a9128a18
This commit is contained in:
parent
a9bab5de7c
commit
f507668c63
@ -763,6 +763,11 @@ MediaDecoder::MetadataLoaded(UniquePtr<MediaInfo> aInfo,
|
||||
Invalidate();
|
||||
|
||||
EnsureTelemetryReported();
|
||||
|
||||
// The duration is no longer infinite when we get one from the metadata.
|
||||
if (mInfo->mMetadataDuration && IsInfinite()) {
|
||||
SetInfinite(false);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user