diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-07-28 02:29:14 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-07-28 02:29:14 -0400 |
| commit | 9b98d8b2e1e970a8ae23851c8c5f3155f6ff4e88 (patch) | |
| tree | 7654c7c62445d06355b1f0602ff316467f1e3d09 /MediaBrowser.Api/ApiEntryPoint.cs | |
| parent | 2fb082cbf356a1c09f1537a41e55f4e8e9c50353 (diff) | |
update stream management
Diffstat (limited to 'MediaBrowser.Api/ApiEntryPoint.cs')
| -rw-r--r-- | MediaBrowser.Api/ApiEntryPoint.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/MediaBrowser.Api/ApiEntryPoint.cs b/MediaBrowser.Api/ApiEntryPoint.cs index dc811812a..87fa3d46c 100644 --- a/MediaBrowser.Api/ApiEntryPoint.cs +++ b/MediaBrowser.Api/ApiEntryPoint.cs @@ -126,9 +126,10 @@ namespace MediaBrowser.Api /// <param name="dispose"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param> protected virtual void Dispose(bool dispose) { - var jobCount = _activeTranscodingJobs.Count; + var list = _activeTranscodingJobs.ToList(); + var jobCount = list.Count; - Parallel.ForEach(_activeTranscodingJobs.ToList(), j => KillTranscodingJob(j, false, path => true)); + Parallel.ForEach(list, j => KillTranscodingJob(j, false, path => true)); // Try to allow for some time to kill the ffmpeg processes and delete the partial stream files if (jobCount > 0) |
