Bug 1101885: P2. Don't shutdown WMF framework before releasing decoder. r=cpearce
authorJean-Yves Avenard <jyavenard@mozilla.com>
Thu, 29 Oct 2015 00:46:30 +1100
changeset 305049 1960607e6dc536f4ce85517cde64e85fad7a0c3a
parent 305048 784181a02b0816d779110ff015b314d4c841ff5c
child 305050 4a22ac249968bc4b652faef7d892d726a4906e5d
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce
bugs1101885
milestone44.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 1101885: P2. Don't shutdown WMF framework before releasing decoder. r=cpearce
dom/media/platforms/wmf/WMFDecoderModule.cpp
--- a/dom/media/platforms/wmf/WMFDecoderModule.cpp
+++ b/dom/media/platforms/wmf/WMFDecoderModule.cpp
@@ -135,20 +135,23 @@ WMFDecoderModule::CreateAudioDecoder(con
 }
 
 static bool
 CanCreateMFTDecoder(const GUID& aGuid)
 {
   if (FAILED(wmf::MFStartup())) {
     return false;
   }
-  RefPtr<MFTDecoder> decoder(new MFTDecoder());
-  bool hasH264 = SUCCEEDED(decoder->Create(aGuid));
+  bool hasdecoder = false;
+  {
+    RefPtr<MFTDecoder> decoder(new MFTDecoder());
+    hasdecoder = SUCCEEDED(decoder->Create(aGuid));
+  }
   wmf::MFShutdown();
-  return hasH264;
+  return hasdecoder;
 }
 
 template<const GUID& aGuid>
 static bool
 CanCreateWMFDecoder()
 {
   static Maybe<bool> result;
   if (result.isNothing()) {