Skip to content

Commit

Permalink
[DashTree] Add missing playready init data
Browse files Browse the repository at this point in the history
  • Loading branch information
CastagnaIT committed Aug 29, 2024
1 parent 2decfb8 commit 3ca3ea0
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/parser/DASHTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1286,9 +1286,16 @@ void adaptive::CDashTree::ParseTagContentProtection(
}
else if (childName == "mspr:pro" || childName == "pro")
{
DRM::PRHeaderParser parser;
if (parser.Parse(node.child_value()))
protScheme.kid = STRING::ToHexadecimal(parser.GetKID());
if (protScheme.kid.empty() || protScheme.pssh.empty())
{
DRM::PRHeaderParser parser;
if (parser.Parse(node.child_value()))
{
protScheme.kid = STRING::ToHexadecimal(parser.GetKID());
protScheme.pssh =
BASE64::Encode(DRM::PSSH::Make(DRM::ID_PLAYREADY, {}, parser.GetInitData()));
}
}
}
}

Expand Down

0 comments on commit 3ca3ea0

Please sign in to comment.