diff options
| author | Cody Robibero <cody@robibe.ro> | 2021-06-04 06:36:58 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-04 14:36:58 +0200 |
| commit | 9154f20b3404fb818b8c2e74af038547d2c16c40 (patch) | |
| tree | 207f80cdc19da9918185c424d57a2272a65cfa09 /Jellyfin.Api/Helpers/TranscodingJobHelper.cs | |
| parent | b060d9d0f1b3dac523288a3aaf182f7e35cf875c (diff) | |
Don't dispose managed CancellationTokenSource (#6139)
Diffstat (limited to 'Jellyfin.Api/Helpers/TranscodingJobHelper.cs')
| -rw-r--r-- | Jellyfin.Api/Helpers/TranscodingJobHelper.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Jellyfin.Api/Helpers/TranscodingJobHelper.cs b/Jellyfin.Api/Helpers/TranscodingJobHelper.cs index b4db0c83e..c295af7eb 100644 --- a/Jellyfin.Api/Helpers/TranscodingJobHelper.cs +++ b/Jellyfin.Api/Helpers/TranscodingJobHelper.cs @@ -269,7 +269,7 @@ namespace Jellyfin.Api.Helpers { _activeTranscodingJobs.Remove(job); - if (!job.CancellationTokenSource!.IsCancellationRequested) + if (job.CancellationTokenSource?.IsCancellationRequested == false) { job.CancellationTokenSource.Cancel(); } @@ -751,7 +751,7 @@ namespace Jellyfin.Api.Helpers _logger.LogError("FFmpeg exited with code {0}", process.ExitCode); } - process.Dispose(); + job.Dispose(); } private async Task AcquireResources(StreamState state, CancellationTokenSource cancellationTokenSource) |
