Fix playready_extra_header_data

It should be enclosed in the <DATA> element.

https://docs.microsoft.com/en-us/playready/specifications/playready-header-specification

Fixes #961.
Fixes b/173146719.

Change-Id: I7d235a44afda4a0a301e7231dc8a4e87cce124be
This commit is contained in:
KongQun Yang 2021-06-17 17:44:00 -07:00
parent b07988e4f9
commit c0d68083ac
1 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ const std::string kPlayHeaderObject_4_0 =
"version=\"4.0.0.0\"><DATA>" "version=\"4.0.0.0\"><DATA>"
"<PROTECTINFO><KEYLEN>16</KEYLEN><ALGID>AESCTR</ALGID></PROTECTINFO>" "<PROTECTINFO><KEYLEN>16</KEYLEN><ALGID>AESCTR</ALGID></PROTECTINFO>"
"<KID>$0</KID><CHECKSUM>$1</CHECKSUM>" "<KID>$0</KID><CHECKSUM>$1</CHECKSUM>"
"</DATA>$2</WRMHEADER>"; "$2</DATA></WRMHEADER>";
// For PlayReady clients 4.0+ that support CBC keys. // For PlayReady clients 4.0+ that support CBC keys.
const std::string kPlayHeaderObject_4_3 = const std::string kPlayHeaderObject_4_3 =
@ -40,7 +40,7 @@ const std::string kPlayHeaderObject_4_3 =
"xmlns=\"http://schemas.microsoft.com/DRM/2007/03/PlayReadyHeader\" " "xmlns=\"http://schemas.microsoft.com/DRM/2007/03/PlayReadyHeader\" "
"version=\"4.3.0.0\"><DATA><PROTECTINFO><KIDS>" "version=\"4.3.0.0\"><DATA><PROTECTINFO><KIDS>"
"<KID ALGID=\"AESCBC\" VALUE=\"$0\"></KID>" "<KID ALGID=\"AESCBC\" VALUE=\"$0\"></KID>"
"</KIDS></PROTECTINFO></DATA>$1</WRMHEADER>"; "</KIDS></PROTECTINFO>$1</DATA></WRMHEADER>";
// Converts the key_id's endianness. // Converts the key_id's endianness.
std::vector<uint8_t> ConvertGuidEndianness(const std::vector<uint8_t>& input) { std::vector<uint8_t> ConvertGuidEndianness(const std::vector<uint8_t>& input) {