aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Thumbs/Video.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-05-17 13:28:23 +0000
committerMario <mario@mariovavti.com>2023-05-17 13:28:23 +0000
commit65d98af24c3c7b784f7e2c95998df65901011ce3 (patch)
treed7d6a60698d7a0c3704ea55cb71c543285186b17 /Zotlabs/Thumbs/Video.php
parenta57739c462a7991bf2130e8eca0c383eb276f0cd (diff)
parent62d35627f35537d0056482047e74a27ad837c3cf (diff)
downloadvolse-hubzilla-65d98af24c3c7b784f7e2c95998df65901011ce3.tar.gz
volse-hubzilla-65d98af24c3c7b784f7e2c95998df65901011ce3.tar.bz2
volse-hubzilla-65d98af24c3c7b784f7e2c95998df65901011ce3.zip
Merge branch '8.4RC'8.4
Diffstat (limited to 'Zotlabs/Thumbs/Video.php')
-rw-r--r--Zotlabs/Thumbs/Video.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/Zotlabs/Thumbs/Video.php b/Zotlabs/Thumbs/Video.php
index 15d3ace12..9df27d703 100644
--- a/Zotlabs/Thumbs/Video.php
+++ b/Zotlabs/Thumbs/Video.php
@@ -11,16 +11,19 @@ class Video {
function Thumb($attach,$preview_style,$height = 300, $width = 300) {
+ $file = dbunescbin($attach['content']);
+ if (!$file) {
+ return;
+ }
+
$photo = false;
$t = explode('/',$attach['filetype']);
if($t[1])
$extension = '.' . $t[1];
else
- return;
+ return;
-
- $file = dbunescbin($attach['content']);
$tmpfile = $file . $extension;
$outfile = $file . '.jpg';
@@ -40,7 +43,7 @@ class Video {
$ffmpeg = trim(shell_exec('which ffmpeg'));
- if($ffmpeg) {
+ if($ffmpeg) {
logger('ffmpeg not found in path. Video thumbnails may fail.');
}
@@ -59,7 +62,7 @@ class Video {
@rename($outfile,$file . '.thumb');
}
}
-
+
@unlink($tmpfile);
}
}