From 7f77eac87f7649f5bb706ef0204bf7faca3cfeb2 Mon Sep 17 00:00:00 2001 From: Alex Henrie Date: Tue, 14 Jan 2020 04:03:28 +0000 Subject: [PATCH] Bug 1608657 - Drop version check from WMFDecoderDllName and inline when possible. r=jya Differential Revision: https://phabricator.services.mozilla.com/D59604 --HG-- extra : moz-landing-system : lando --- media/gmp-clearkey/0.1/WMFUtils.cpp | 10 ---------- media/gmp-clearkey/0.1/WMFUtils.h | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/media/gmp-clearkey/0.1/WMFUtils.cpp b/media/gmp-clearkey/0.1/WMFUtils.cpp index ed04d436d3fd..33d84e2aceb9 100644 --- a/media/gmp-clearkey/0.1/WMFUtils.cpp +++ b/media/gmp-clearkey/0.1/WMFUtils.cpp @@ -66,16 +66,6 @@ static bool LinkMfplat() { return sInitOk; } -const char* WMFDecoderDllName() { - // For H.264 decoding, we need msmpeg2vdec.dll on Win 7 & 8, - // and mfh264dec.dll on Vista. - if (IsWindows7OrGreater()) { - return "msmpeg2vdec.dll"; - } else { - return "mfh264dec.dll"; - } -} - bool EnsureLibs() { static bool sInitDone = false; static bool sInitOk = false; diff --git a/media/gmp-clearkey/0.1/WMFUtils.h b/media/gmp-clearkey/0.1/WMFUtils.h index ff083092d281..60322c8c0f90 100644 --- a/media/gmp-clearkey/0.1/WMFUtils.h +++ b/media/gmp-clearkey/0.1/WMFUtils.h @@ -232,7 +232,7 @@ CreateMFT(const CLSID& clsid, const char* aDllName, // Returns the name of the DLL that is needed to decode H.264 on // the given windows version we're running on. -const char* WMFDecoderDllName(); +inline const char* WMFDecoderDllName() { return "msmpeg2vdec.dll"; } // Returns the maximum number of threads we want WMF to use for decoding // given the number of logical processors available.