From 18a313c454d07011bb9707cf2eb806bcb4f764fb Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 17 Jun 2009 10:44:15 +0800 Subject: Use a placeholder image if ffmpeg is missing instead of throwing an exception which would get silently swallowed by swfUpload. Signed-off-by: --- modules/gallery/helpers/graphics.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'modules/gallery/helpers/graphics.php') diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php index feebfb34..3f3317ae 100644 --- a/modules/gallery/helpers/graphics.php +++ b/modules/gallery/helpers/graphics.php @@ -135,7 +135,12 @@ class graphics_Core { if ($input_item->is_movie()) { // Convert the movie to a JPG first $output_file = preg_replace("/...$/", "jpg", $output_file); - movie::extract_frame($input_file, $output_file); + try { + movie::extract_frame($input_file, $output_file); + } catch (Exception $e) { + // Assuming this is MISSING_FFMPEG for now + copy(MODPATH . "gallery/images/missing_movie.png", $output_file); + } $working_file = $output_file; } else { $working_file = $input_file; -- cgit v1.2.3