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,