Bug 1403622 - Allow VP8 HW decoder where known not to crash. r=cpearce
authorJean-Yves Avenard <jyavenard@mozilla.com>
Mon, 09 Oct 2017 10:43:54 +0200
changeset 427779 12108e68b1a4c924de93cdf217750429bf20c998
parent 427778 2aa3f925ceb23ba2acd696c121ca8a89820629c6
child 427780 d4641f9d27a0564e70d94a3b1b5dab3d85afdedc
push id97
push userfmarier@mozilla.com
push dateSat, 14 Oct 2017 01:12:59 +0000
reviewerscpearce
bugs1403622, 16287, 1403063
milestone58.0a1
Bug 1403622 - Allow VP8 HW decoder where known not to crash. r=cpearce Windows 10 Falls Creator Update build 16287 is known to have the fix to the problem that made bug 1403063 necessary. MozReview-Commit-ID: 5m3ZWMes1yl
dom/media/platforms/wmf/WMFDecoderModule.cpp
--- a/dom/media/platforms/wmf/WMFDecoderModule.cpp
+++ b/dom/media/platforms/wmf/WMFDecoderModule.cpp
@@ -210,16 +210,22 @@ WMFDecoderModule::Supports(const TrackIn
   if (MP4Decoder::IsH264(aTrackInfo.mMimeType) && WMFDecoderModule::HasH264()) {
     return true;
   }
   if (aTrackInfo.mMimeType.EqualsLiteral("audio/mpeg") &&
       CanCreateWMFDecoder<CLSID_CMP3DecMediaObject>()) {
     return true;
   }
   if (MediaPrefs::PDMWMFVP9DecoderEnabled()) {
+    static const uint32_t VP8_USABLE_BUILD = 16287;
+    if (VPXDecoder::IsVP8(aTrackInfo.mMimeType) &&
+        IsWindowsBuildOrLater(VP8_USABLE_BUILD) &&
+        CanCreateWMFDecoder<CLSID_WebmMfVpxDec>()) {
+      return true;
+    }
     if (VPXDecoder::IsVP9(aTrackInfo.mMimeType) &&
         ((gfxPrefs::PDMWMFAMDVP9DecoderEnabled() &&
           CanCreateWMFDecoder<CLSID_AMDWebmMfVp9Dec>()) ||
          CanCreateWMFDecoder<CLSID_WebmMfVpxDec>())) {
       return true;
     }
   }