зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1266336 - Check sCDMWrapper before creating video decoder - r=cpearce
Ensure that there is a CDM before creating a video decoder that relies on that CDM. This is mainly to prevent using the Widevine video decoder alone, without decryption. MozReview-Commit-ID: 7p49CnmV2r7 --HG-- extra : rebase_source : 49b07100b2be56584bc14f41d39d4872f0539c3a
This commit is contained in:
Родитель
faee3cba4f
Коммит
7a14964bfb
|
@ -124,7 +124,13 @@ WidevineAdapter::GMPGetAPI(const char* aAPIName,
|
|||
*aPluginAPI = decryptor;
|
||||
|
||||
} else if (!strcmp(aAPIName, GMP_API_VIDEO_DECODER)) {
|
||||
*aPluginAPI = new WidevineVideoDecoder(static_cast<GMPVideoHost*>(aHostAPI), RefPtr<CDMWrapper>(sCDMWrapper));
|
||||
if (!sCDMWrapper) {
|
||||
Log("WidevineAdapter::GMPGetAPI(%s, 0x%p, 0x%p) this=0x%p No cdm for video decoder",
|
||||
aAPIName, aHostAPI, aPluginAPI, this);
|
||||
return GMPGenericErr;
|
||||
}
|
||||
*aPluginAPI = new WidevineVideoDecoder(static_cast<GMPVideoHost*>(aHostAPI),
|
||||
RefPtr<CDMWrapper>(sCDMWrapper));
|
||||
|
||||
}
|
||||
return *aPluginAPI ? GMPNoErr : GMPNotImplementedErr;
|
||||
|
|
Загрузка…
Ссылка в новой задаче