зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1345341 - Ensure Widevine expiration time of 0 means 'never expire'. r=jwwang
MozReview-Commit-ID: DtJnwDo7KZq --HG-- extra : rebase_source : de55240a54c28046eda20530f610248ba2a02161
This commit is contained in:
Родитель
91a7e70dbc
Коммит
af3f34b472
|
@ -609,7 +609,10 @@ GMPCDMProxy::OnExpirationChange(const nsAString& aSessionId,
|
|||
}
|
||||
RefPtr<dom::MediaKeySession> session(mKeys->GetSession(aSessionId));
|
||||
if (session) {
|
||||
session->SetExpiration(static_cast<double>(aExpiryTime));
|
||||
// Expiry of 0 is interpreted as "never expire". See bug 1345341.
|
||||
double t = (aExpiryTime == 0) ? std::numeric_limits<double>::quiet_NaN()
|
||||
: static_cast<double>(aExpiryTime);
|
||||
session->SetExpiration(t);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -414,11 +414,7 @@ WidevineDecryptor::OnExpirationChange(const char* aSessionId,
|
|||
return;
|
||||
}
|
||||
CDM_LOG("Decryptor::OnExpirationChange(sid=%s) t=%lf", aSessionId, aNewExpiryTime);
|
||||
GMPTimestamp expiry = ToGMPTime(aNewExpiryTime);
|
||||
if (aNewExpiryTime == 0) {
|
||||
return;
|
||||
}
|
||||
mCallback->ExpirationChange(aSessionId, aSessionIdSize, expiry);
|
||||
mCallback->ExpirationChange(aSessionId, aSessionIdSize, ToGMPTime(aNewExpiryTime));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Загрузка…
Ссылка в новой задаче