diff --git a/packager/app/test/testdata/encryption-with-multi-drms/output.mpd b/packager/app/test/testdata/encryption-with-multi-drms/output.mpd index 4f9bab2413..3815d7834f 100644 --- a/packager/app/test/testdata/encryption-with-multi-drms/output.mpd +++ b/packager/app/test/testdata/encryption-with-multi-drms/output.mpd @@ -10,7 +10,7 @@ AAAAOHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAABgSEDEyMzQ1Njc4OTAxMjM0NTZI49yVmwY= - + urn:marlin:kid:31323334353637383930313233343536 @@ -30,7 +30,7 @@ AAAAOHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAABgSEDEyMzQ1Njc4OTAxMjM0NTZI49yVmwY= - + urn:marlin:kid:31323334353637383930313233343536 diff --git a/packager/mpd/base/mpd_utils.cc b/packager/mpd/base/mpd_utils.cc index 9c173413c1..ff3f44a8b4 100644 --- a/packager/mpd/base/mpd_utils.cc +++ b/packager/mpd/base/mpd_utils.cc @@ -385,7 +385,6 @@ void AddContentProtectionElementsHelperTemplated( } ContentProtectionElement drm_content_protection; - drm_content_protection.scheme_id_uri = "urn:uuid:" + entry.uuid(); if (entry.has_name_version()) drm_content_protection.value = entry.name_version(); @@ -395,11 +394,17 @@ void AddContentProtectionElementsHelperTemplated( "not support DASH signaling."; continue; } else if (entry.uuid() == kMarlinUUID) { + // Marlin requires its uuid to be in upper case. See #525 for details. + drm_content_protection.scheme_id_uri = + "urn:uuid:" + base::ToUpperASCII(entry.uuid()); drm_content_protection.subelements.push_back( GenerateMarlinContentIds(protected_content.default_key_id())); - } else if (!entry.pssh().empty()) { - drm_content_protection.subelements.push_back( - GenerateCencPsshElement(entry.pssh())); + } else { + drm_content_protection.scheme_id_uri = "urn:uuid:" + entry.uuid(); + if (!entry.pssh().empty()) { + drm_content_protection.subelements.push_back( + GenerateCencPsshElement(entry.pssh())); + } } if (!key_id_uuid_format.empty() && !is_mp4_container) { diff --git a/packager/mpd/base/mpd_utils_unittest.cc b/packager/mpd/base/mpd_utils_unittest.cc index b82b8f0a69..37b512508d 100644 --- a/packager/mpd/base/mpd_utils_unittest.cc +++ b/packager/mpd/base/mpd_utils_unittest.cc @@ -103,7 +103,7 @@ TEST_F(MpdUtilsTest, ContentProtectionMarlin) { " schemeIdUri='urn:mpeg:dash:mp4protection:2011'" " cenc:default_KID='30313233-3435-3637-3839-3a3b3c3d3e3f'/>" " " + " schemeIdUri='urn:uuid:5E629AF5-38DA-4063-8977-97FFBD9902D4'>" " " " " " urn:marlin:kid:303132333435363738393a3b3c3d3e3f"