From d2276a48d2180f6493ac1a4f5cf865cb67b2b215 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Thu, 22 Sep 2022 13:14:17 +0000 Subject: [PATCH] Issue #1977 - Follow-up: Correct pref check to be selective on wave formats only. --- dom/media/DecoderTraits.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dom/media/DecoderTraits.cpp b/dom/media/DecoderTraits.cpp index d4968c0b4e..2309a80202 100644 --- a/dom/media/DecoderTraits.cpp +++ b/dom/media/DecoderTraits.cpp @@ -285,7 +285,8 @@ bool DecoderTraits::ShouldHandleMediaType(const char* aMIMEType, // behavior, where they use their helper apps to open WAV audio // instead. We should allow this old behavior behind a pref for // those who want it. - if (!Preferences::GetBool("media.wave.play-stand-alone", true)) { + if (!Preferences::GetBool("media.wave.play-stand-alone", true) && + IsWaveSupportedType(nsDependentCString(aMIMEType))) { return false; }