Correct KeySetId value when returned by AddKey
[ Merge of http://go/wvgerrit/25643 ] The MediaDrm#provideKeyResponse API states that an empty byte array is returned when the license type is streaming or release but a non-empty value was being returned in some cases. The KeySetId is now returned when the license type is offline or when the license is streaming and has a secure stop associated with it. Test: Verified by request_license_test integration tests. Tests have been modified to validate the returned Key Set Id values. b/36093612 Change-Id: I82dba537c77ddd1d1876cbce58729f3db901ee51
This commit is contained in:
@@ -363,7 +363,13 @@ CdmResponseType CdmEngine::AddKey(const CdmSessionId& session_id,
|
||||
|
||||
CdmResponseType sts = iter->second->AddKey(key_data);
|
||||
if (key_set_id) {
|
||||
*key_set_id = iter->second->key_set_id();
|
||||
if ((iter->second->is_offline() ||
|
||||
iter->second->has_provider_session_token()) &&
|
||||
!license_type_release) {
|
||||
*key_set_id = iter->second->key_set_id();
|
||||
} else {
|
||||
key_set_id->clear();
|
||||
}
|
||||
}
|
||||
|
||||
switch (sts) {
|
||||
|
||||
Reference in New Issue
Block a user