Skip to content

Commit

Permalink
Fix playready_extra_header_data
Browse files Browse the repository at this point in the history
It should be enclosed in the <DATA> element.

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

Fixes shaka-project#961.
Fixes b/173146719.

Change-Id: I7d235a44afda4a0a301e7231dc8a4e87cce124be
  • Loading branch information
kqyang authored and sr1990 committed Feb 18, 2023
1 parent 0100a4f commit 10a7014
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packager/media/base/playready_pssh_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ const std::string kPlayHeaderObject_4_0 =
"version=\"4.0.0.0\"><DATA>"
"<PROTECTINFO><KEYLEN>16</KEYLEN><ALGID>AESCTR</ALGID></PROTECTINFO>"
"<KID>$0</KID><CHECKSUM>$1</CHECKSUM>"
"</DATA>$2</WRMHEADER>";
"$2</DATA></WRMHEADER>";

// For PlayReady clients 4.0+ that support CBC keys.
const std::string kPlayHeaderObject_4_3 =
"<WRMHEADER "
"xmlns=\"http://schemas.microsoft.com/DRM/2007/03/PlayReadyHeader\" "
"version=\"4.3.0.0\"><DATA><PROTECTINFO><KIDS>"
"<KID ALGID=\"AESCBC\" VALUE=\"$0\"></KID>"
"</KIDS></PROTECTINFO></DATA>$1</WRMHEADER>";
"</KIDS></PROTECTINFO>$1</DATA></WRMHEADER>";

// Converts the key_id's endianness.
std::vector<uint8_t> ConvertGuidEndianness(const std::vector<uint8_t>& input) {
Expand Down

0 comments on commit 10a7014

Please sign in to comment.