From e1690f5d25d43d3210d5963bf2267217c6eb5634 Mon Sep 17 00:00:00 2001 From: CastagnaIT Date: Tue, 27 Aug 2024 09:43:49 +0200 Subject: [PATCH] [DashTree] Removed clearkey KID workaround its now taken from mp4box --- src/parser/DASHTree.cpp | 44 ----------------------------------------- 1 file changed, 44 deletions(-) diff --git a/src/parser/DASHTree.cpp b/src/parser/DASHTree.cpp index 18261c1e3..a0cd6b022 100644 --- a/src/parser/DASHTree.cpp +++ b/src/parser/DASHTree.cpp @@ -12,7 +12,6 @@ #include "PRProtectionParser.h" #include "SrvBroker.h" #include "common/Period.h" -#include "decrypters/Helpers.h" #include "utils/Base64Utils.h" #include "utils/CurlUtils.h" #include "utils/StringUtils.h" @@ -1337,49 +1336,6 @@ bool adaptive::CDashTree::GetProtectionData( } } - // Workaround for ClearKey: - // if license type ClearKey is set and a manifest dont contains ClearKey protection scheme - // in any case the KID is required to allow decryption (with clear keys or license URLs provided by Kodi props) - //! @todo: this should not be a task of parser, moreover missing an appropriate KID extraction from mp4 box - auto& kodiProps = CSrvBroker::GetKodiProps(); - ProtectionScheme ckProtScheme; - if (kodiProps.GetLicenseType() == DRM::KS_CLEARKEY) - { - std::string_view defaultKid; - if (protSelected) - defaultKid = protSelected->kid; - if (defaultKid.empty() && protCommon) - defaultKid = protCommon->kid; - - if (defaultKid.empty()) - { - for (const ProtectionScheme& protScheme : reprProtSchemes) - { - if (!protScheme.kid.empty()) - { - defaultKid = protScheme.kid; - break; - } - } - if (defaultKid.empty()) - { - for (const ProtectionScheme& protScheme : adpProtSchemes) - { - if (!protScheme.kid.empty()) - { - defaultKid = protScheme.kid; - break; - } - } - } - if (protCommon) - ckProtScheme = *protCommon; - - ckProtScheme.kid = defaultKid; - protCommon = &ckProtScheme; - } - } - bool isEncrypted{false}; std::string selectedKid; std::string selectedPssh;