Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Unified Diff: content/common/gpu/media/dxva_video_decode_accelerator.cc

Issue 502183002: Don't use msmpeg2vdec.dll version 6.1.7140 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: adding crbug link Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/dxva_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/dxva_video_decode_accelerator.cc b/content/common/gpu/media/dxva_video_decode_accelerator.cc
index 1c9f6f313ac12abeb26f85eb016c82c64e849820..5f15f90e64654bfe1828231cee98fe7ba921c31b 100644
--- a/content/common/gpu/media/dxva_video_decode_accelerator.cc
+++ b/content/common/gpu/media/dxva_video_decode_accelerator.cc
@@ -18,6 +18,7 @@
#include "base/callback.h"
#include "base/command_line.h"
#include "base/debug/trace_event.h"
+#include "base/file_version_info.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/shared_memory.h"
@@ -638,6 +639,19 @@ bool DXVAVideoDecodeAccelerator::InitDecoder(media::VideoCodecProfile profile) {
"msmpeg2vdec.dll required for decoding is not loaded",
false);
+ // Check version of DLL, version 6.7.7140 is blacklisted due to high crash
+ // rates in browsers loading that DLL. If that is the version installed we
+ // fall back to software decoding. See crbug/403440.
+ FileVersionInfo* version_info =
+ FileVersionInfo::CreateFileVersionInfoForModule(decoder_dll);
+ RETURN_ON_FAILURE(version_info,
+ "unable to get version of msmpeg2vdec.dll",
+ false);
+ base::string16 file_version = version_info->file_version();
+ RETURN_ON_FAILURE(file_version.find(L"6.1.7140") == base::string16::npos,
+ "blacklisted version of msmpeg2vdec.dll 6.7.7140",
+ false);
+
typedef HRESULT(WINAPI * GetClassObject)(
const CLSID & clsid, const IID & iid, void * *object);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698