Fix a bug in the DXVA Codec Detection code.

This commit is contained in:
EAZYBLACK 2026-09-13 11:16:23 +03:00
commit 5ec3ae4a4c

View file

@ -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;
}
}
}