import from UXP: Issue #2949 - Part 4: Don't attempt to use WMF VP9 decoder for profiles 1 and 3. (26708f41)

This commit is contained in:
2026-02-20 09:16:14 +08:00
parent c2f4c2f20a
commit ca2ee60cd2
@@ -578,6 +578,16 @@ WMFVideoMFTManager::Input(MediaRawData* aSample)
return E_FAIL;
}
if (mStreamType == VP9 && aSample->mKeyframe) {
// Check the VP9 profile. the VP9 MFT can only handle correctly profile 0
// and 2 (yuv420 8/10/12 bits)
int profile =
VPXDecoder::GetVP9Profile(MakeSpan(aSample->Data(), aSample->Size()));
if (profile != 0 && profile != 2) {
return E_FAIL;
}
}
HRESULT hr = mDecoder->CreateInputSample(aSample->Data(),
uint32_t(aSample->Size()),
aSample->mTime,