Bug 1200775 - Followup to fix typo and indent issues
authorMatt Woodrow <mwoodrow@mozilla.com>
Thu, 10 Sep 2015 15:15:41 -0400
changeset 294453 6f234301d1b87053b8024d4fd401a93dc4e2ee08
parent 294452 2c0cdff94db8e8e51eabd993e8d864d84c83117b
child 294454 b5e4fcb51b1718b2dbf4870de31f1ec3954132db
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1200775
milestone43.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 1200775 - Followup to fix typo and indent issues
dom/media/platforms/wmf/DXVA2Manager.cpp
--- a/dom/media/platforms/wmf/DXVA2Manager.cpp
+++ b/dom/media/platforms/wmf/DXVA2Manager.cpp
@@ -197,18 +197,18 @@ D3D9DXVA2Manager::SupportsConfig(IMFMedi
 
   UINT configCount;
   DXVA2_ConfigPictureDecode* configs = nullptr;
   hr = mDecoderService->GetDecoderConfigurations(mDecoderGUID, &desc, nullptr, &configCount, &configs);
   NS_ENSURE_TRUE(SUCCEEDED(hr), false);
 
   nsRefPtr<IDirect3DSurface9> surface;
   hr = mDecoderService->CreateSurface(desc.SampleWidth, desc.SampleHeight, 0, (D3DFORMAT)MAKEFOURCC('N', 'V', '1', '2'),
-  D3DPOOL_DEFAULT, 0, DXVA2_VideoDecoderRenderTarget,
-  surface.StartAssignment(), NULL);
+                                      D3DPOOL_DEFAULT, 0, DXVA2_VideoDecoderRenderTarget,
+                                      surface.StartAssignment(), NULL);
   if (!SUCCEEDED(hr)) {
     CoTaskMemFree(configs);
     return false;
   }
 
   for (UINT i = 0; i < configCount; i++) {
     nsRefPtr<IDirectXVideoDecoder> decoder;
     IDirect3DSurface9* surfaces = surface;
@@ -375,17 +375,17 @@ D3D9DXVA2Manager::Init(nsACString& aFail
 
   D3DADAPTER_IDENTIFIER9 adapter;
   hr = d3d9Ex->GetAdapterIdentifier(D3DADAPTER_DEFAULT, 0, &adapter);
   if (!SUCCEEDED(hr)) {
     aFailureReason = nsPrintfCString("IDirect3D9Ex::GetAdapterIdentifier failed with error %X", hr);
     return hr;
   }
 
-  if (adapter.VendorId = 0x1022) {
+  if (adapter.VendorId == 0x1022) {
     for (size_t i = 0; i < MOZ_ARRAY_LENGTH(sAMDPreUVD4); i++) {
       if (adapter.DeviceId == sAMDPreUVD4[i]) {
         mIsAMDPreUVD4 = true;
         break;
       }
     }
   }
 
@@ -619,17 +619,17 @@ D3D11DXVA2Manager::Init(nsACString& aFai
     return hr;
   }
 
   bool found = false;
   UINT profileCount = videoDevice->GetVideoDecoderProfileCount();
   for (UINT i = 0; i < profileCount; i++) {
     GUID id;
     hr = videoDevice->GetVideoDecoderProfile(i, &id);
-    if (SUCCEEDED(hr) && id == DXVA2_ModeH264_E || id == DXVA2_Intel_ModeH264_E) {
+    if (SUCCEEDED(hr) && (id == DXVA2_ModeH264_E || id == DXVA2_Intel_ModeH264_E)) {
       mDecoderGUID = id;
       found = true;
       break;
     }
   }
   if (!found) {
     aFailureReason.AssignLiteral("Failed to find an appropriate decoder GUID");
     return E_FAIL;
@@ -662,17 +662,17 @@ D3D11DXVA2Manager::Init(nsACString& aFai
 
   DXGI_ADAPTER_DESC adapterDesc;
   hr = adapter->GetDesc(&adapterDesc);
   if (!SUCCEEDED(hr)) {
     aFailureReason = nsPrintfCString("IDXGIAdapter::GetDesc failed with code %X", hr);
     return hr;
   }
 
-  if (adapterDesc.VendorId = 0x1022) {
+  if (adapterDesc.VendorId == 0x1022) {
     for (size_t i = 0; i < MOZ_ARRAY_LENGTH(sAMDPreUVD4); i++) {
       if (adapterDesc.DeviceId == sAMDPreUVD4[i]) {
         mIsAMDPreUVD4 = true;
         break;
       }
     }
   }