aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.MediaEncoding/Encoder
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.MediaEncoding/Encoder')
-rw-r--r--MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs6
-rw-r--r--MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs8
2 files changed, 7 insertions, 7 deletions
diff --git a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs
index 1ae3c976d..8479b7d50 100644
--- a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs
+++ b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs
@@ -188,11 +188,11 @@ namespace MediaBrowser.MediaEncoding.Encoder
// Work out what the version under test is
var version = GetFFmpegVersionInternal(versionOutput);
- _logger.LogInformation("Found ffmpeg version {Version}", version != null ? version.ToString() : "unknown");
+ _logger.LogInformation("Found ffmpeg version {Version}", version is not null ? version.ToString() : "unknown");
if (version is null)
{
- if (MaxVersion != null) // Version is unknown
+ if (MaxVersion is not null) // Version is unknown
{
if (MinVersion == MaxVersion)
{
@@ -215,7 +215,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
_logger.LogWarning("FFmpeg validation: The minimum recommended version is {MinVersion}", MinVersion);
return false;
}
- else if (MaxVersion != null && version > MaxVersion) // Version is above what we recommend
+ else if (MaxVersion is not null && version > MaxVersion) // Version is above what we recommend
{
_logger.LogWarning("FFmpeg validation: The maximum recommended version is {MaxVersion}", MaxVersion);
return false;
diff --git a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
index 9abfb9102..addaea33e 100644
--- a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
+++ b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
@@ -157,7 +157,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
_configurationManager.SaveConfiguration("encoding", options);
// Only if mpeg path is set, try and set path to probe
- if (_ffmpegPath != null)
+ if (_ffmpegPath is not null)
{
// Determine a probe path from the mpeg path
_ffprobePath = Regex.Replace(_ffmpegPath, @"[^\/\\]+?(\.[^\/\\\n.]+)?$", @"ffprobe$1");
@@ -536,7 +536,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
throw new FfmpegException("ffprobe failed - streams and format are both null.");
}
- if (result.Streams != null)
+ if (result.Streams is not null)
{
// Normalize aspect ratio if invalid
foreach (var stream in result.Streams)
@@ -660,7 +660,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
var filters = new List<string>();
// deinterlace using bwdif algorithm for video stream.
- if (videoStream != null && videoStream.IsInterlaced)
+ if (videoStream is not null && videoStream.IsInterlaced)
{
filters.Add("bwdif=0:-1:0");
}
@@ -1017,7 +1017,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
{
if (!_disposed)
{
- if (Process != null)
+ if (Process is not null)
{
Process.Exited -= OnProcessExited;
DisposeProcess(Process);