inputstream.adaptive: [DASHTree] Allow content protection without systemid urn

This commit is contained in:
Rudi Heitbaum 2023-06-03 10:51:24 +00:00
parent aa86c4db0b
commit f4ec02ac6e

View File

@ -0,0 +1,78 @@
From c4aeb31d09f5d53e0f29793a5ee295454bcc00ea Mon Sep 17 00:00:00 2001
From: CastagnaIT <gottardo.stefano.83@gmail.com>
Date: Wed, 31 May 2023 09:34:31 +0200
Subject: [PATCH 1/3] [DASHTree] Allow content protection without systemid
---
src/parser/DASHTree.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/parser/DASHTree.cpp b/src/parser/DASHTree.cpp
index 66cac634..80e8a3c8 100644
--- a/src/parser/DASHTree.cpp
+++ b/src/parser/DASHTree.cpp
@@ -1433,7 +1433,7 @@ bool adaptive::CDashTree::ParseTagContentProtection(pugi::xml_node nodeParent,
}
}
- return isUrnSchemeFound;
+ return isUrnSchemeFound || isUrnProtectionFound;
}
uint32_t adaptive::CDashTree::ParseAudioChannelConfig(pugi::xml_node node)
From 58216354739b95ae1e94f2a3aef6f061be415c73 Mon Sep 17 00:00:00 2001
From: CastagnaIT <gottardo.stefano.83@gmail.com>
Date: Wed, 31 May 2023 14:24:37 +0200
Subject: [PATCH 2/3] [DASHTree] Dont overwrite default pssh value when not
exist
---
src/parser/DASHTree.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/parser/DASHTree.cpp b/src/parser/DASHTree.cpp
index 80e8a3c8..57b2a215 100644
--- a/src/parser/DASHTree.cpp
+++ b/src/parser/DASHTree.cpp
@@ -1408,15 +1408,14 @@ bool adaptive::CDashTree::ParseTagContentProtection(pugi::xml_node nodeParent,
if (commonPssh.empty() && !playReadyPro.empty())
{
- currentPssh = PSSH_FROM_FILE;
-
PRProtectionParser parser;
if (parser.ParseHeader(playReadyPro))
currentDefaultKID = parser.GetKID();
}
else
{
- currentPssh = commonPssh;
+ if (!commonPssh.empty())
+ currentPssh = commonPssh;
if ((isUrnSchemeFound || isUrnProtectionFound) && defaultKID && std::strlen(defaultKID) == 36)
{
From 82a4301277f587632448b2649bdc812488f14f6b Mon Sep 17 00:00:00 2001
From: CastagnaIT <gottardo.stefano.83@gmail.com>
Date: Wed, 31 May 2023 14:31:43 +0200
Subject: [PATCH 3/3] [Session] Replaced FILE pssh with appropriate define
---
src/Session.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Session.cpp b/src/Session.cpp
index 6c618a47..b064989c 100644
--- a/src/Session.cpp
+++ b/src/Session.cpp
@@ -466,7 +466,7 @@ bool CSession::InitializeDRM(bool addDefaultKID /* = false */)
CPeriod::PSSHSet& sessionPsshset = m_adaptiveTree->m_currentPeriod->GetPSSHSets()[ses];
- if (sessionPsshset.pssh_ == "FILE")
+ if (sessionPsshset.pssh_ == PSSH_FROM_FILE)
{
LOG::Log(LOGDEBUG, "Searching PSSH data in FILE");