Skip to content

Commit 08d92bf

Browse files
committed
fix video upload bug
1 parent 57ac044 commit 08d92bf

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

models/media_model.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ public function media_info($args = [])
9090
shell_exec('mv ' . escapeshellarg($args['filename']) . '-header.webm ' . escapeshellarg($args['filename']));
9191
shell_exec('rm ' . escapeshellarg($args['filename']) . 'webm');
9292

93-
$mediainfo = json_decode(shell_exec('ffprobe -show_format -show_streams -of json ' . escapeshellarg($args['filename'])));
93+
$mediainfoNew = json_decode(shell_exec('ffprobe -show_format -show_streams -of json ' . escapeshellarg($args['filename'])));
94+
if (property_exists($mediainfoNew, 'format')) {
95+
$mediainfo = $mediainfoNew;
96+
}
97+
9498
$mediainfo->format->format_name = 'webm';
9599
}
96100

0 commit comments

Comments
 (0)