Skip to content

Commit

Permalink
Verify that the ffmpeg path still exists by using file_exists(). This
Browse files Browse the repository at this point in the history
is a lightweight way to catch the case where ffmpeg gets deleted.
Fixes ticket #1303.
  • Loading branch information
bharat committed Aug 21, 2010
1 parent 7c1a716 commit 4a01aad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/gallery/helpers/movie.php
Expand Up @@ -84,7 +84,7 @@ static function extract_frame($input_file, $output_file) {
}

static function find_ffmpeg() {
if (!$ffmpeg_path = module::get_var("gallery", "ffmpeg_path")) {
if (!($ffmpeg_path = module::get_var("gallery", "ffmpeg_path")) || !file_exists($ffmpeg_path)) {
$graphics_path = module::get_var("gallery", "graphics_toolkit_path", null);

putenv("PATH=" . getenv("PATH") . (empty($graphics_path) ? "" : ":$graphics_path") .
Expand Down

0 comments on commit 4a01aad

Please sign in to comment.