diff options
| author | Bond_009 <bond.009@outlook.com> | 2023-10-06 00:40:09 +0200 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2023-10-06 01:04:25 +0200 |
| commit | b176beb88e22a36cc056439ac2a4df4fbe68f2c1 (patch) | |
| tree | 46988cc14ba7e8bdd9d6eb89588b1472f6caa25d /Jellyfin.Api/Helpers/TranscodingJobHelper.cs | |
| parent | 40f7eb4e8cd9e250fb3870a4799a5a8d949e2068 (diff) | |
Reduce string allocations
Some simple changes to reduce the number of allocated strings
Diffstat (limited to 'Jellyfin.Api/Helpers/TranscodingJobHelper.cs')
| -rw-r--r-- | Jellyfin.Api/Helpers/TranscodingJobHelper.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Jellyfin.Api/Helpers/TranscodingJobHelper.cs b/Jellyfin.Api/Helpers/TranscodingJobHelper.cs index 73ebb396d..c16a586d6 100644 --- a/Jellyfin.Api/Helpers/TranscodingJobHelper.cs +++ b/Jellyfin.Api/Helpers/TranscodingJobHelper.cs @@ -538,7 +538,7 @@ public class TranscodingJobHelper : IDisposable await _attachmentExtractor.ExtractAllAttachments(state.MediaPath, state.MediaSource, attachmentPath, cancellationTokenSource.Token).ConfigureAwait(false); } - if (state.SubtitleStream.IsExternal && string.Equals(Path.GetExtension(state.SubtitleStream.Path), ".mks", StringComparison.OrdinalIgnoreCase)) + if (state.SubtitleStream.IsExternal && Path.GetExtension(state.SubtitleStream.Path.AsSpan()).Equals(".mks", StringComparison.OrdinalIgnoreCase)) { string subtitlePath = state.SubtitleStream.Path; string subtitlePathArgument = string.Format(CultureInfo.InvariantCulture, "file:\"{0}\"", subtitlePath.Replace("\"", "\\\"", StringComparison.Ordinal)); |
