diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-04 17:48:22 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-04 17:48:22 +0000 |
commit | 96921d17f7932adaa6cc5afc37b3d13c46715ae5 (patch) | |
tree | 17b410095fe9950cfb71fb2361c995e9a726ba6e | |
parent | bf8d01693570f078078c006b7fdb834e25388b97 (diff) | |
download | chromium_src-96921d17f7932adaa6cc5afc37b3d13c46715ae5.zip chromium_src-96921d17f7932adaa6cc5afc37b3d13c46715ae5.tar.gz chromium_src-96921d17f7932adaa6cc5afc37b3d13c46715ae5.tar.bz2 |
Linux: preload ffmpeg in the zygote.
When using the sandbox, the renderer cannot load the ffmpeg shared
objects from disk. So we load them in the zygote before the sandbox is
started.
(Note that this doesn't get media working, but it's a start.)
BUG=18329
http://codereview.chromium.org/159841
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22392 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/zygote_main_linux.cc | 7 | ||||
-rwxr-xr-x | third_party/ffmpeg/ffmpeg.gyp | 4 |
2 files changed, 10 insertions, 1 deletions
diff --git a/chrome/browser/zygote_main_linux.cc b/chrome/browser/zygote_main_linux.cc index a163550..01eb837 100644 --- a/chrome/browser/zygote_main_linux.cc +++ b/chrome/browser/zygote_main_linux.cc @@ -14,6 +14,7 @@ #include "base/command_line.h" #include "base/eintr_wrapper.h" #include "base/global_descriptors_posix.h" +#include "base/path_service.h" #include "base/pickle.h" #include "base/rand_util.h" #include "base/unix_domain_socket_posix.h" @@ -25,6 +26,8 @@ #include "chrome/common/process_watcher.h" #include "chrome/common/sandbox_methods_linux.h" +#include "media/base/media.h" + #include "skia/ext/SkFontHost_fontconfig_control.h" // http://code.google.com/p/chromium/wiki/LinuxZygote @@ -323,6 +326,10 @@ static bool MaybeEnterChroot() { PATCH_GLOBAL_OFFSET_TABLE(localtime_r, sandbox_wrapper::localtime_r); #endif + FilePath module_path; + if (PathService::Get(base::DIR_MODULE, &module_path)) + media::InitializeMediaLibrary(module_path); + static const char kChrootMe = 'C'; static const char kChrootMeSuccess = 'O'; diff --git a/third_party/ffmpeg/ffmpeg.gyp b/third_party/ffmpeg/ffmpeg.gyp index f035165..458328f 100755 --- a/third_party/ffmpeg/ffmpeg.gyp +++ b/third_party/ffmpeg/ffmpeg.gyp @@ -21,9 +21,11 @@ 'variables': { 'generate_stubs_script': 'generate_stubs.py', 'sig_files': [ + # Note that these must be listed in dependency order. + # (i.e. if A depends on B, then B must be listed before A.) + 'avutil-50.sigs', 'avcodec-52.sigs', 'avformat-52.sigs', - 'avutil-50.sigs', ], 'extra_header': 'ffmpeg_stub_headers.fragment', }, |