Bug 1403622 - Allow VP8 HW decoder where known not to crash. r?cpearce draft
authorJean-Yves Avenard <jyavenard@mozilla.com>
Mon, 09 Oct 2017 10:43:54 +0200
changeset 676669 6bc550e58fc6540ca49a426307fa62d4ad9fd215
parent 676663 42b2ae84f14b00d67ecdc3e0ecf8d7e442d451fe
child 676695 068d6dd260df53885f3d81f10aef031857c0dae2
push id83575
push userbmo:jyavenard@mozilla.com
push dateMon, 09 Oct 2017 08:44:20 +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;
     }
   }