diff --git a/dom/media/platforms/wmf/DXVA2Manager.cpp b/dom/media/platforms/wmf/DXVA2Manager.cpp index f985dfb3ea..69de2be84f 100644 --- a/dom/media/platforms/wmf/DXVA2Manager.cpp +++ b/dom/media/platforms/wmf/DXVA2Manager.cpp @@ -389,11 +389,10 @@ D3D9DXVA2Manager::Init(layers::KnowsCompositor* aKnowsCompositor, bool found = false; for (UINT i = 0; i < deviceCount; i++) { if (decoderDevices[i] == DXVA2_ModeH264_E || - decoderDevices[i] == DXVA2_Intel_ModeH264_E) { + decoderDevices[i] == DXVA2_Intel_ModeH264_E || + decoderDevices[i] == DXVA2_ModeVP9_VLD_Profile0) { mDecoderGUID = decoderDevices[i]; found = true; - } else if (decoderDevices[i] == DXVA2_ModeVP9_VLD_Profile0) { - found = true; } } CoTaskMemFree(decoderDevices); @@ -696,11 +695,9 @@ D3D11DXVA2Manager::Init(layers::KnowsCompositor* aKnowsCompositor, GUID id; hr = videoDevice->GetVideoDecoderProfile(i, &id); if (SUCCEEDED(hr)) { - if (id == DXVA2_ModeH264_E || id == DXVA2_Intel_ModeH264_E) { + if (id == DXVA2_ModeH264_E || id == DXVA2_Intel_ModeH264_E || id == DXVA2_ModeVP9_VLD_Profile0) { mDecoderGUID = id; found = true; - } else if (id == DXVA2_ModeVP9_VLD_Profile0) { - found = true; } } }