Index: media/cdm/aes_decryptor.cc |
diff --git a/media/cdm/aes_decryptor.cc b/media/cdm/aes_decryptor.cc |
index c145b008c5d0b2167572172f0057091ebafa239a..7dd4a76b5e72e90c5ff36657a1afd4f030f3621c 100644 |
--- a/media/cdm/aes_decryptor.cc |
+++ b/media/cdm/aes_decryptor.cc |
@@ -27,6 +27,14 @@ |
namespace media { |
+#if defined(USE_PROPRIETARY_CODECS) |
+// CENC SystemID for the Common System. |
+// https://w3c.github.io/encrypted-media/cenc-format.html#common-system |
+const uint8_t kCencCommonSystemId[] = {0x10, 0x77, 0xef, 0xec, 0xc0, 0xb2, |
+ 0x4d, 0x02, 0xac, 0xe3, 0x3c, 0x1e, |
+ 0x52, 0xe2, 0xfb, 0x4b}; |
+#endif |
+ |
// 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 +283,17 @@ 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( |
+ kCencCommonSystemId, |
+ kCencCommonSystemId + arraysize(kCencCommonSystemId)); |
+ if (!GetKeyIdsFromPsshBoxes(init_data, common_system_id, &keys)) { |
promise->reject(NOT_SUPPORTED_ERROR, 0, |
"No supported PSSH box found."); |
return; |
} |
- break; |
+ } break; |
#else |
promise->reject(NOT_SUPPORTED_ERROR, 0, |
"Initialization data type CENC is not supported."); |