Fix expiry time overflow if it is unlimited
Bug: 21324836 Merged from Widevine CDM repo: https://widevine-internal-review.googlesource.com/#/c/14392 Change-Id: I2a8da14c98f8ae0fece3667b6f6b8517577f8a98
This commit is contained in:
@@ -280,13 +280,13 @@ void PolicyEngine::UpdateRenewalRequest(int64_t current_time) {
|
||||
int64_t PolicyEngine::GetLicenseExpiryTime() {
|
||||
return policy_max_duration_seconds_ > 0
|
||||
? license_start_time_ + policy_max_duration_seconds_
|
||||
: LLONG_MAX;
|
||||
: NEVER_EXPIRES;
|
||||
}
|
||||
|
||||
int64_t PolicyEngine::GetPlaybackExpiryTime() {
|
||||
return (playback_start_time_ > 0 && policy_.playback_duration_seconds() > 0)
|
||||
? (playback_start_time_ + policy_.playback_duration_seconds())
|
||||
: LLONG_MAX;
|
||||
: NEVER_EXPIRES;
|
||||
}
|
||||
|
||||
int64_t PolicyEngine::GetLicenseDurationRemaining(int64_t current_time) {
|
||||
|
||||
Reference in New Issue
Block a user