Bug 1374936: P2. Check for error. r?mattwoodrow draft
authorJean-Yves Avenard <jyavenard@mozilla.com>
Wed, 21 Jun 2017 08:48:18 +0200
changeset 597924 2e08109b42af4c6c0047c35c47add42d3e829dd1
parent 597922 a1e93e80dc80f3f0e0fce0fa4cbc911c4cdb4579
child 634367 92bcd7e5401c31e5cf355de6b24165182446b70c
push id65086
push userbmo:jyavenard@mozilla.com
push dateWed, 21 Jun 2017 06:50:37 +0000
reviewersmattwoodrow
bugs1374936
milestone56.0a1
Bug 1374936: P2. Check for error. r?mattwoodrow MozReview-Commit-ID: A8Cy3BsZS8h
dom/media/platforms/wmf/DXVA2Manager.cpp
--- a/dom/media/platforms/wmf/DXVA2Manager.cpp
+++ b/dom/media/platforms/wmf/DXVA2Manager.cpp
@@ -974,17 +974,18 @@ D3D11DXVA2Manager::CopyToBGRATexture(ID3
 
   HRESULT hr;
   RefPtr<ID3D11Texture2D> texture, inTexture;
 
   inTexture = aInTexture;
 
   CD3D11_TEXTURE2D_DESC desc;
   aInTexture->GetDesc(&desc);
-  ConfigureForSize(desc.Width, desc.Height);
+  hr = ConfigureForSize(desc.Width, desc.Height);
+  NS_ENSURE_TRUE(SUCCEEDED(hr), hr);
 
   RefPtr<IDXGIKeyedMutex> mutex;
   inTexture->QueryInterface((IDXGIKeyedMutex**)getter_AddRefs(mutex));
   // The rest of this function will not work if inTexture implements
   // IDXGIKeyedMutex! In that case case we would have to copy to a
   // non-mutex using texture.
 
   if (mutex) {