diff options
Diffstat (limited to 'media/cdm/default_cdm_factory.cc')
-rw-r--r-- | media/cdm/default_cdm_factory.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/media/cdm/default_cdm_factory.cc b/media/cdm/default_cdm_factory.cc index 4132a24..6b9714a 100644 --- a/media/cdm/default_cdm_factory.cc +++ b/media/cdm/default_cdm_factory.cc @@ -32,9 +32,15 @@ void DefaultCdmFactory::Create( const SessionKeysChangeCB& session_keys_change_cb, const SessionExpirationUpdateCB& session_expiration_update_cb, const CdmCreatedCB& cdm_created_cb) { - if (!security_origin.is_valid() || !CanUseAesDecryptor(key_system)) { + if (!security_origin.is_valid()) { base::ThreadTaskRunnerHandle::Get()->PostTask( - FROM_HERE, base::Bind(cdm_created_cb, nullptr)); + FROM_HERE, base::Bind(cdm_created_cb, nullptr, "Invalid origin.")); + return; + } + if (!CanUseAesDecryptor(key_system)) { + base::ThreadTaskRunnerHandle::Get()->PostTask( + FROM_HERE, + base::Bind(cdm_created_cb, nullptr, "Unsupported key system.")); return; } @@ -42,7 +48,7 @@ void DefaultCdmFactory::Create( new AesDecryptor(security_origin, session_message_cb, session_closed_cb, session_keys_change_cb)); base::ThreadTaskRunnerHandle::Get()->PostTask( - FROM_HERE, base::Bind(cdm_created_cb, base::Passed(&cdm))); + FROM_HERE, base::Bind(cdm_created_cb, base::Passed(&cdm), "")); } } // namespace media |