diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-06-16 19:44:15 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-06-16 19:47:52 -0700 |
commit | b4ef00c8d4e55fe7db3147da21cb4239fd3c428c (patch) | |
tree | 764295fbcf9077a5101618aee030df4c42e64af3 /modules/gallery/helpers/graphics.php | |
parent | 7ad5e9ee2c6c912932e8c38c992c9b1194c9107a (diff) |
Use a placeholder image if ffmpeg is missing instead of throwing an
exception which would get silently swallowed by swfUpload.
Diffstat (limited to 'modules/gallery/helpers/graphics.php')
-rw-r--r-- | modules/gallery/helpers/graphics.php | 7 |
1 files changed, 6 insertions, 1 deletions
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; |