Bug 1410022 - Remove redundant PDM::Supports check caused by bug 1407919 part6. r?gerald draft
authorJames Cheng <jacheng@mozilla.com>
Thu, 19 Oct 2017 18:03:09 +0800
changeset 683192 f1bc0d32d428dfd582c9e9a126f3b7be8ccacdbe
parent 683191 b5a7b59eaf1c16d54fba7feddf88cff880091dd7
child 736557 cc8e4c6edb32c5db83034815648a73f3a17b0076
push id85281
push userbmo:jacheng@mozilla.com
push dateThu, 19 Oct 2017 10:03:45 +0000
reviewersgerald
bugs1410022, 1407919
milestone58.0a1
Bug 1410022 - Remove redundant PDM::Supports check caused by bug 1407919 part6. r?gerald MozReview-Commit-ID: EoAARcmhjlV
dom/media/webm/WebMDecoder.cpp
--- a/dom/media/webm/WebMDecoder.cpp
+++ b/dom/media/webm/WebMDecoder.cpp
@@ -53,21 +53,22 @@ WebMDecoder::IsSupportedType(const Media
       }
       // If it is vp8 or vp9, check the bit depth.
       if (trackInfo) {
         uint8_t profile = 0;
         uint8_t level = 0;
         uint8_t bitDepth = 0;
         if (ExtractVPXCodecDetails(codec, profile, level, bitDepth)) {
           trackInfo->GetAsVideoInfo()->mBitDepth = bitDepth;
-        }
-        // Verify that we have a PDM that supports this bit depth.
-        RefPtr<PDMFactory> platform = new PDMFactory();
-        if (!platform->Supports(*trackInfo, nullptr)) {
-          return false;
+
+          // Verify that we have a PDM that supports this bit depth.
+          RefPtr<PDMFactory> platform = new PDMFactory();
+          if (!platform->Supports(*trackInfo, nullptr)) {
+            return false;
+          }
         }
         continue;
       }
     }
 #ifdef MOZ_AV1
     if (isVideo && AOMDecoder::IsSupportedCodec(codec)) {
       continue;
     }