Use 0 to represent unexpired license in OnExpirationUpdate

Also fix a missing change for
"playback duration should override license duration".

Merged from Widevine CDM repo:
https://widevine-internal-review.googlesource.com/#/c/14435/

Bug: 21393975
Change-Id: Ibfcf3ae4c13db8944ea285bcc79b6312ea621e1b
This commit is contained in:
Kongqun Yang
2015-05-22 11:36:20 -07:00
parent 5f227dd85d
commit 3cdc43caeb
5 changed files with 29 additions and 22 deletions

View File

@@ -348,8 +348,7 @@ CdmResponseType CdmSession::Decrypt(const CdmDecryptionParameters& params) {
} else {
Clock clock;
int64_t current_time = clock.GetCurrentTime();
if (policy_engine_->IsLicenseDurationExpired(current_time) ||
policy_engine_->IsPlaybackDurationExpired(current_time)) {
if (policy_engine_->IsLicenseOrPlaybackDurationExpired(current_time)) {
return NEED_KEY;
}
}