diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-06-09 18:59:53 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-06-09 18:59:53 -0700 |
commit | d0b25445119274760af40722eaa95279c2942a89 (patch) | |
tree | ddfdbfed99d852d30dadc4218136dd12e0f82b56 | |
parent | 79d526f1faccb2f929f00c296cb22941d74b8eb2 (diff) |
Check in /usr/local/bin for ffmpeg, and create the setting even if its
empty (to make it easier for folks to change it in Admin > Settings >
Advanced)
-rw-r--r-- | modules/gallery/helpers/movie.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/gallery/helpers/movie.php b/modules/gallery/helpers/movie.php index 3aa40dc9..986d5f62 100644 --- a/modules/gallery/helpers/movie.php +++ b/modules/gallery/helpers/movie.php @@ -142,10 +142,12 @@ class movie_Core { if (!$ffmpeg_path = module::get_var("gallery", "ffmpeg_path")) { if (function_exists("exec")) { $ffmpeg_path = exec("which ffmpeg"); - if ($ffmpeg_path) { - module::set_var("gallery", "ffmpeg_path", $ffmpeg_path); - } } + + if (empty($ffmpeg) && @file_exists("/usr/local/bin/ffmpeg")) { + $ffmpeg_path = "/usr/local/bin/ffmpeg"; + } + module::set_var("gallery", "ffmpeg_path", $ffmpeg_path); } return $ffmpeg_path; } |