]> source.dussan.org Git - nextcloud-server.git/commitdiff
Simplify the binary finding code in the movie preview class
authorJoas Schilling <nickvergessen@gmx.de>
Thu, 20 Nov 2014 11:41:55 +0000 (12:41 +0100)
committerJoas Schilling <nickvergessen@gmx.de>
Thu, 20 Nov 2014 11:41:55 +0000 (12:41 +0100)
lib/private/preview/movies.php

index 8217ad2440939e8138170b3d361575911eecf448..d69266ceb33b70bd6837fad876c1cb8a6c63d7e5 100644 (file)
@@ -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;