Skip to content
Snippets Groups Projects
Commit d15f1882 authored by Joas Schilling's avatar Joas Schilling
Browse files

Simplify the binary finding code in the movie preview class

parent 64421d76
No related branches found
No related tags found
No related merge requests found
......@@ -10,18 +10,10 @@ namespace OC\Preview;
// movie preview is currently not supported on Windows
if (!\OC_Util::runningOnWindows()) {
$isExecEnabled = \OC_Helper::is_function_enabled('exec');
$ffmpegBinary = null;
$avconvBinary = null;
if ($isExecEnabled) {
$avconvBinary = \OC_Helper::findBinaryPath('avconv');
if (!$avconvBinary) {
$ffmpegBinary = \OC_Helper::findBinaryPath('ffmpeg');
}
}
$avconvBinary = \OC_Helper::findBinaryPath('avconv');
$ffmpegBinary = ($avconvBinary) ? null : \OC_Helper::findBinaryPath('ffmpeg');
if($isExecEnabled && ( $avconvBinary || $ffmpegBinary )) {
if ($avconvBinary || $ffmpegBinary) {
class Movie extends Provider {
public static $avconvBinary;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment