From 490df4930792a2d497a2c4191efad2839088d585 Mon Sep 17 00:00:00 2001 From: Jeremy Andrews Date: Mon, 23 Oct 2023 22:56:21 -0500 Subject: [PATCH] Issue #2357 - WebM w/alpha renders black if WMF decoder is enabled. Mozilla forgot to force use of VPXDecoder on Windows in their initial implementation, this is pretty much what they did for Android as well. Straight port of the Firefox 67 fix. Ref: BZ 1528652 --- dom/media/platforms/wmf/WMFDecoderModule.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dom/media/platforms/wmf/WMFDecoderModule.cpp b/dom/media/platforms/wmf/WMFDecoderModule.cpp index 98412a80a2..46e78fb17f 100644 --- a/dom/media/platforms/wmf/WMFDecoderModule.cpp +++ b/dom/media/platforms/wmf/WMFDecoderModule.cpp @@ -83,6 +83,14 @@ WMFDecoderModule::Startup() already_AddRefed WMFDecoderModule::CreateVideoDecoder(const CreateDecoderParams& aParams) { + // Temporary - forces use of VPXDecoder when alpha is present. + // Bug 1263836 will handle alpha scenario once implemented. It will shift + // the check for alpha to PDMFactory but not itself remove the need for a + // check. + if (aParams.VideoConfig().HasAlpha()) { + return nullptr; + } + nsAutoPtr manager( new WMFVideoMFTManager(aParams.VideoConfig(), aParams.mKnowsCompositor,