| Index: media/cdm/ppapi/external_clear_key/clear_key_cdm.cc
|
| diff --git a/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc b/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc
|
| index 6087dcc6d6b7915e028114f02754bc181c37e566..6a6ff62a548832451cafb2bdb081d396d6cc55aa 100644
|
| --- a/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc
|
| +++ b/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc
|
| @@ -44,17 +44,25 @@ MSVC_PUSH_DISABLE_WARNING(4244);
|
| MSVC_POP_WARNING();
|
| } // extern "C"
|
|
|
| +// TODO(tomfinegan): When COMPONENT_BUILD is not defined an AtExitManager must
|
| +// exist before the call to InitializeFFmpegLibraries(). This should no longer
|
| +// be required after http://crbug.com/91970 because we'll be able to get rid of
|
| +// InitializeFFmpegLibraries().
|
| #if !defined COMPONENT_BUILD
|
| static base::AtExitManager g_at_exit_manager;
|
| #endif
|
|
|
| -// Prepare media library.
|
| +// TODO(tomfinegan): InitializeFFmpegLibraries() and |g_cdm_module_initialized|
|
| +// are required for running in the sandbox, and should no longer be required
|
| +// after http://crbug.com/91970 is fixed.
|
| static bool InitializeFFmpegLibraries() {
|
| - media::InitializeMediaLibrary();
|
| + base::FilePath file_path;
|
| + CHECK(PathService::Get(base::DIR_MODULE, &file_path));
|
| + CHECK(media::InitializeMediaLibrary(file_path));
|
| return true;
|
| }
|
| -static bool g_ffmpeg_lib_initialized = InitializeFFmpegLibraries();
|
|
|
| +static bool g_ffmpeg_lib_initialized = InitializeFFmpegLibraries();
|
| #endif // CLEAR_KEY_CDM_USE_FFMPEG_DECODER
|
|
|
| const char kClearKeyCdmVersion[] = "0.1.0.1";
|
| @@ -222,6 +230,7 @@ class ScopedResetter {
|
|
|
| void INITIALIZE_CDM_MODULE() {
|
| #if defined(CLEAR_KEY_CDM_USE_FFMPEG_DECODER)
|
| + DVLOG(2) << "FFmpeg libraries initialized: " << g_ffmpeg_lib_initialized;
|
| av_register_all();
|
| #endif // CLEAR_KEY_CDM_USE_FFMPEG_DECODER
|
| }
|
|
|