Chromium Code Reviews| 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 |