Fix Crash When Renewing Licenses

The changes to support the newest EME spec did not account for an
empty init data.

(This is a merge of
https://widevine-internal-review.googlesource.com/#/c/9991/
from the Widevine CDM repo.)

Bug: 14410226
Change-Id: Ieb818751fa49e92068014d64767c563da2050431
This commit is contained in:
John "Juce" Bruce
2014-04-29 14:38:39 -07:00
parent e17c61edb1
commit e924571282

View File

@@ -161,7 +161,8 @@ status_t WVDrmPlugin::getKeyRequest(
}
CdmInitData processedInitData;
if (WvContentDecryptionModule::IsCenc(cdmInitDataType) &&
if (initData.size() > 0 &&
WvContentDecryptionModule::IsCenc(cdmInitDataType) &&
!InitDataResemblesPSSH(initData)) {
// This data was passed in the old format, pre-unwrapped. We need to wrap
// the init data in a new PSSH header.