From 5ec3ae4a4cc9c6c602b934d958319ef343ebf2fb Mon Sep 17 00:00:00 2001 From: EAZYBLACK Date: Sun, 13 Sep 2026 11:16:23 +0300 Subject: [PATCH] Fix a bug in the DXVA Codec Detection code. --- dom/media/platforms/wmf/DXVA2Manager.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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; } } }