mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 1266336 - Check actual CDM creation - r=cpearce
Check the return result from Widevine's CDM creation function, and handle failure. MozReview-Commit-ID: HYvKgdK53aQ --HG-- extra : rebase_source : b3e28ba5e0020e3a6dd77c8a83b58be233fdc770
This commit is contained in:
parent
7a14964bfb
commit
bb3afc2867
@ -101,7 +101,7 @@ WidevineAdapter::GMPGetAPI(const char* aAPIName,
|
||||
auto create = reinterpret_cast<decltype(::CreateCdmInstance)*>(
|
||||
PR_FindFunctionSymbol(mLib, "CreateCdmInstance"));
|
||||
if (!create) {
|
||||
Log("WidevineAdapter::GMPGetAPI(%s, 0x%p, 0x%p) this=0x%p FAILED to create cdm",
|
||||
Log("WidevineAdapter::GMPGetAPI(%s, 0x%p, 0x%p) this=0x%p FAILED to find CreateCdmInstance",
|
||||
aAPIName, aHostAPI, aPluginAPI, this);
|
||||
return GMPGenericErr;
|
||||
}
|
||||
@ -114,6 +114,11 @@ WidevineAdapter::GMPGetAPI(const char* aAPIName,
|
||||
strlen(WidevineKeySystem),
|
||||
&GetCdmHost,
|
||||
decryptor));
|
||||
if (!cdm) {
|
||||
Log("WidevineAdapter::GMPGetAPI(%s, 0x%p, 0x%p) this=0x%p FAILED to create cdm",
|
||||
aAPIName, aHostAPI, aPluginAPI, this);
|
||||
return GMPGenericErr;
|
||||
}
|
||||
Log("cdm: 0x%x", cdm);
|
||||
sCDMWrapper = new CDMWrapper(cdm);
|
||||
decryptor->SetCDM(RefPtr<CDMWrapper>(sCDMWrapper));
|
||||
|
Loading…
Reference in New Issue
Block a user