diff options
-rw-r--r-- | transcoders/video_ffmpeg_php.inc | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/transcoders/video_ffmpeg_php.inc b/transcoders/video_ffmpeg_php.inc index 5b0d8ba..2569616 100644 --- a/transcoders/video_ffmpeg_php.inc +++ b/transcoders/video_ffmpeg_php.inc @@ -61,12 +61,7 @@ class video_ffmpeg_php extends video_ffmpeg implements transcoder_interface { // Get the frame and create thumb file $frame = $movie->getFrame($framenumber); - if ($frame) { - $thumb = $frame->toGDImage(); - imagejpeg($thumb, drupal_realpath($thumbfile)); - } - - if (!file_exists(drupal_realpath($thumbfile))) { + if (!$frame || !imagejpeg($frame->toGDImage(), drupal_realpath($thumbfile))) { $error_param = array('%file' => $thumbfile); $error_msg = t("Error generating thumbnail for video: generated file %file does not exist.", $error_param); // Log the error message. |