Chromium Code Reviews| Index: media/cdm/aes_decryptor.cc |
| diff --git a/media/cdm/aes_decryptor.cc b/media/cdm/aes_decryptor.cc |
| index c145b008c5d0b2167572172f0057091ebafa239a..64e31d4da4415d3c0489c31047769bfbcacef213 100644 |
| --- a/media/cdm/aes_decryptor.cc |
| +++ b/media/cdm/aes_decryptor.cc |
| @@ -27,6 +27,12 @@ |
| namespace media { |
| +// SystemID for the Common System. |
| +// https://w3c.github.io/encrypted-media/cenc-format.html#common-system |
| +const uint8_t kCommonSystemId[] = {0x10, 0x77, 0xef, 0xec, 0xc0, 0xb2, |
|
ddorwin
2015/06/25 21:18:12
This needs some qualification since it is CENC-spe
jrummell
2015/06/25 22:35:58
Done. Also made dependent on USE_PROPRIETARY_CODEC
|
| + 0x4d, 0x02, 0xac, 0xe3, 0x3c, 0x1e, |
| + 0x52, 0xe2, 0xfb, 0x4b}; |
| + |
| // Keeps track of the session IDs and DecryptionKeys. The keys are ordered by |
| // insertion time (last insertion is first). It takes ownership of the |
| // DecryptionKeys. |
| @@ -275,13 +281,16 @@ void AesDecryptor::CreateSessionAndGenerateRequest( |
| break; |
| case EmeInitDataType::CENC: |
| #if defined(USE_PROPRIETARY_CODECS) |
| + { |
| // |init_data| is a set of 0 or more concatenated 'pssh' boxes. |
| - if (!GetKeyIdsForCommonSystemId(init_data, &keys)) { |
| + std::vector<uint8_t> common_system_id( |
| + kCommonSystemId, kCommonSystemId + arraysize(kCommonSystemId)); |
| + if (!GetKeyIds(init_data, common_system_id, &keys)) { |
| promise->reject(NOT_SUPPORTED_ERROR, 0, |
| "No supported PSSH box found."); |
| return; |
| } |
| - break; |
| + } break; |
|
ddorwin
2015/06/25 21:18:12
Is this clang format? It looks weird.
jrummell
2015/06/25 22:35:58
Yup.
|
| #else |
| promise->reject(NOT_SUPPORTED_ERROR, 0, |
| "Initialization data type CENC is not supported."); |