Use a placeholder image if ffmpeg is missing instead of throwing an

exception which would get silently swallowed by swfUpload.
This commit is contained in:
Bharat Mediratta
2009-06-16 19:44:15 -07:00
parent 7ad5e9ee2c
commit b4ef00c8d4
3 changed files with 12 additions and 2 deletions

View File

@@ -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;