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

Unified Diff: media/base/media_win.cc

Issue 797313003: Call av_log_set_level() after loading ffmpegsumo.dll. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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: media/base/media_win.cc
diff --git a/media/base/media_win.cc b/media/base/media_win.cc
index 43bf6a7f45875571927c7272a87cf4a43831f269..5140867da180e35d37ab2c00403e74e5731a69df 100644
--- a/media/base/media_win.cc
+++ b/media/base/media_win.cc
@@ -12,6 +12,7 @@
#include <delayimp.h>
#include "base/files/file_path.h"
+#include "media/ffmpeg/ffmpeg_common.h"
#pragma comment(lib, "delayimp.lib")
@@ -31,8 +32,20 @@ bool InitializeMediaLibraryInternal(const base::FilePath& module_dir) {
module_dir.AppendASCII(kFFmpegDLL).value().c_str(), NULL,
LOAD_WITH_ALTERED_SEARCH_PATH);
- // Check that we loaded the library successfully.
- return lib != NULL;
+ bool initialized = (lib != NULL);
+
+ // TODO(scherkus): Remove all the bool-ness from these functions as we no
+ // longer support disabling HTML5 media at runtime. http://crbug.com/440892
+ CHECK(initialized);
+
+ // VS2013 has a bug where FMA3 instructions will be executed on CPUs that
DaleCurtis 2014/12/12 22:58:01 An alternative to doing this is to add the code to
+ // support them despite them being disabled at the OS level, causing illegal
+ // instruction exceptions. Because Web Audio's FFT code *might* run before
+ // HTML5 media code, call av_log_set_level() to force library initialziation.
+ // See http://crbug.com/440892 for details.
+ av_log_set_level(AV_LOG_QUIET);
+
+ return initialized;
}
} // namespace internal
« 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