Merge "Single PSSH entitlement handling" into qt-dev am: 19c6e57269
am: f13e62fbe3
Change-Id: Ib06c9f6606fab960a132d1fb0876108cd7513c2d
This commit is contained in:
@@ -126,10 +126,9 @@ bool InitializationData::SelectWidevinePssh(const CdmInitData& init_data,
|
||||
return false;
|
||||
}
|
||||
|
||||
// If there are multiple PSSHs to choose from and this device prefers
|
||||
// entitlements, find the first |ENTITLED_KEY| PSSH, if present, and
|
||||
// select it.
|
||||
if (prefer_entitlements && pssh_payloads.size() > 1) {
|
||||
// If this device prefers entitlements, search through available PSSHs.
|
||||
// If present, select the first |ENTITLED_KEY| PSSH.
|
||||
if (prefer_entitlements && !pssh_payloads.empty()) {
|
||||
for (size_t i = 0; i < pssh_payloads.size(); ++i) {
|
||||
WidevinePsshData pssh;
|
||||
if (!pssh.ParseFromString(pssh_payloads[i])) {
|
||||
@@ -146,12 +145,6 @@ bool InitializationData::SelectWidevinePssh(const CdmInitData& init_data,
|
||||
}
|
||||
}
|
||||
|
||||
WidevinePsshData pssh;
|
||||
if (prefer_entitlements && pssh.ParseFromString(pssh_payloads[0])) {
|
||||
if (pssh.type() == WidevinePsshData_Type_ENTITLED_KEY)
|
||||
contains_entitled_keys_ = true;
|
||||
}
|
||||
|
||||
// Either there is only one PSSH, this device does not prefer entitlements,
|
||||
// or no entitlement PSSH was found. Regardless of how we got here, select the
|
||||
// first PSSH, which should be a |SINGLE| PSSH.
|
||||
|
||||
Reference in New Issue
Block a user