From b920034e3be73eb010a349115cf25ca2a4ef83a7 Mon Sep 17 00:00:00 2001 From: "John \"Juce\" Bruce" Date: Tue, 1 Apr 2014 15:42:03 -0700 Subject: [PATCH] Add Yet More Backwards-Compatibility It turns out the array of things certain apps pass as the MIME type is greater than we believed. To support this, we will treat anything that is not a known type as video/mp4 to mimic old behavior. (This is a merge of https://widevine-internal-review.googlesource.com/9636 from the Widevine CDM repo.) Bug: 13750843 Change-Id: I4b7bbe7d266ade9b35c6c5beb21502bf0715b854 --- libwvdrmengine/mediadrm/src/WVDrmPlugin.cpp | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/libwvdrmengine/mediadrm/src/WVDrmPlugin.cpp b/libwvdrmengine/mediadrm/src/WVDrmPlugin.cpp index ca188362..993f7770 100644 --- a/libwvdrmengine/mediadrm/src/WVDrmPlugin.cpp +++ b/libwvdrmengine/mediadrm/src/WVDrmPlugin.cpp @@ -151,19 +151,11 @@ status_t WVDrmPlugin::getKeyRequest( string cdmMimeType = mimeType.string(); - // Provide backwards-compatibility for versions of apps that pass the wrong - // MIME type. - // TODO(b/13731637) - Remove this. - if (cdmMimeType == "") { - ALOGW("ALERT: Empty MIME type is supported for backwards-compatibility " - "only and may go away in the future. Switch to \"video/mp4\" to " - "become compliant."); - cdmMimeType = "video/mp4"; - } else if (cdmMimeType == "video/avc") { - ALOGW("ALERT: MIME type \"video/avc\" is supported for backwards-" - "compatibility only and may go away in the future. Switch to " - "\"video/mp4\" to become compliant."); - cdmMimeType = "video/mp4"; + // Provide backwards-compatibility for apps that pass non-EME-compatible MIME + // types. + if (cdmMimeType != wvcdm::ISO_BMFF_MIME_TYPE && + cdmMimeType != wvcdm::WEBM_MIME_TYPE) { + cdmMimeType = wvcdm::ISO_BMFF_MIME_TYPE; } CdmInitData processedInitData;