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 385105 12108e68b1a4c924de93cdf217750429bf20c998
parent 385104 2aa3f925ceb23ba2acd696c121ca8a89820629c6
child 385106 d4641f9d27a0564e70d94a3b1b5dab3d85afdedc
push id32646
push userarchaeopteryx@coole-files.de
push dateMon, 09 Oct 2017 21:47:29 +0000
treeherdermozilla-central@4afc55e7033c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce
bugs1403622, 16287, 1403063
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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;
     }
   }