Browse Source

Apply suggestions from code review

Drop the unnecessary initial capacity from the list.

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
nyanmisaka 1 year ago
parent
commit
557b8f0c78

+ 1 - 1
MediaBrowser.Controller/MediaEncoding/TranscodingSegmentCleaner.cs

@@ -156,7 +156,7 @@ public class TranscodingSegmentCleaner : IDisposable
             }
             catch (IOException ex)
             {
-                (exs ??= new List<Exception>(4)).Add(ex);
+                (exs ??= new List<Exception>()).Add(ex);
                 _logger.LogDebug(ex, "Error deleting HLS segment file {Path}", file);
             }
         }

+ 1 - 1
MediaBrowser.MediaEncoding/Transcoding/TranscodeManager.cs

@@ -321,7 +321,7 @@ public sealed class TranscodeManager : ITranscodeManager, IDisposable
             }
             catch (IOException ex)
             {
-                (exs ??= new List<Exception>(4)).Add(ex);
+                (exs ??= new List<Exception>()).Add(ex);
                 _logger.LogError(ex, "Error deleting HLS file {Path}", file);
             }
         }