summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/movie.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/helpers/movie.php')
-rw-r--r--modules/gallery/helpers/movie.php14
1 files changed, 5 insertions, 9 deletions
diff --git a/modules/gallery/helpers/movie.php b/modules/gallery/helpers/movie.php
index 0895c5f4..dd0b437e 100644
--- a/modules/gallery/helpers/movie.php
+++ b/modules/gallery/helpers/movie.php
@@ -83,22 +83,18 @@ class movie_Core {
}
}
+ /**
+ * Return the path to the ffmpeg binary if one exists and is executable, or null.
+ */
static function find_ffmpeg() {
if (!($ffmpeg_path = module::get_var("gallery", "ffmpeg_path")) || !file_exists($ffmpeg_path)) {
- gallery::set_path_env(
- array(module::get_var("gallery", "graphics_toolkit_path"),
- getenv("PATH"),
- module::get_var("gallery", "extra_binary_paths")));
- if (function_exists("exec")) {
- $ffmpeg_path = exec("which ffmpeg");
- }
-
+ $ffmpeg_path = system::find_binary(
+ "ffmpeg", module::get_var("gallery", "graphics_toolkit_path"));
module::set_var("gallery", "ffmpeg_path", $ffmpeg_path);
}
return $ffmpeg_path;
}
-
/**
* Return the width, height, mime_type and extension of the given movie file.
*/