From ca2ee60cd2a28ad30df4d55daee837fe41c5049d Mon Sep 17 00:00:00 2001 From: roytam1 Date: Fri, 20 Feb 2026 09:16:14 +0800 Subject: [PATCH] import from UXP: Issue #2949 - Part 4: Don't attempt to use WMF VP9 decoder for profiles 1 and 3. (26708f41) --- dom/media/platforms/wmf/WMFVideoMFTManager.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dom/media/platforms/wmf/WMFVideoMFTManager.cpp b/dom/media/platforms/wmf/WMFVideoMFTManager.cpp index 81b662e59..f3f620057 100644 --- a/dom/media/platforms/wmf/WMFVideoMFTManager.cpp +++ b/dom/media/platforms/wmf/WMFVideoMFTManager.cpp @@ -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,