diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-11-14 02:29:42 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-11-14 02:29:42 -0500 |
| commit | 54d3c2eed767b6d030961f9a75216c447f94abef (patch) | |
| tree | 1855731242b35ffbed16beb1c96de1e6442a797e /MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs | |
| parent | e8379b865c301cb8ab65eb5b883c44abdbedcf79 (diff) | |
| parent | 43c69713835afee3d27ced041e5f96ec36fa0ce3 (diff) | |
Merge pull request #2288 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs')
| -rw-r--r-- | MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs index 6acdccf3d..1b8b3feec 100644 --- a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs +++ b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs @@ -37,20 +37,22 @@ namespace MediaBrowser.MediaEncoding.Encoder { output = GetProcessOutput(encoderAppPath, "-version"); } - catch + catch (Exception ex) { + if (logOutput) + { + _logger.ErrorException("Error validating encoder", ex); + } } - output = output ?? string.Empty; - - if (logOutput) + if (string.IsNullOrWhiteSpace(output)) { - _logger.Info("ffmpeg info: {0}", output); + return false; } - if (string.IsNullOrWhiteSpace(output)) + if (logOutput) { - return false; + _logger.Info("ffmpeg info: {0}", output); } if (output.IndexOf("Libav developers", StringComparison.OrdinalIgnoreCase) != -1) |
