Bug 1289623 - Assume keys marked as 'output-restricted' are usable. r?gerald draft
authorChris Pearce <cpearce@mozilla.com>
Wed, 27 Jul 2016 11:06:43 +1200
changeset 393052 466aa925ac68cab566a30c7ce849e8827acb2de2
parent 392445 251fccc1f62bf0eac569ef4f6717fea61ebadb27
child 526479 aa49f416ea04fa4a33fb7c7707d9ba8900ffd115
push id24198
push userbmo:cpearce@mozilla.com
push dateTue, 26 Jul 2016 23:18:24 +0000
reviewersgerald
bugs1289623
milestone50.0a1
Bug 1289623 - Assume keys marked as 'output-restricted' are usable. r?gerald Chrome appears to do this. MozReview-Commit-ID: LbSFQiB0pEO
dom/media/eme/CDMCaps.cpp
--- a/dom/media/eme/CDMCaps.cpp
+++ b/dom/media/eme/CDMCaps.cpp
@@ -48,16 +48,17 @@ CDMCaps::AutoLock::IsKeyUsable(const Cen
 {
   mData.mMonitor.AssertCurrentThreadOwns();
   const auto& keys = mData.mKeyStatuses;
   for (size_t i = 0; i < keys.Length(); i++) {
     if (keys[i].mId != aKeyId) {
       continue;
     }
     if (keys[i].mStatus == kGMPUsable ||
+        keys[i].mStatus == kGMPOutputRestricted ||
         keys[i].mStatus == kGMPOutputDownscaled) {
       return true;
     }
   }
   return false;
 }
 
 bool