aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2026-10-24 09:56:04 +0200
committerShadowghost <Ghost_of_Stone@web.de>2026-10-24 09:56:04 +0200
commitd95c2e1425d0d902e8191260ba9151f686aa2650 (patch)
tree3bc937664dcf9fe8d7659b00d92fc3a6c61be805 /MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs
parentd3a92c69f8c1c5d1cda803a35f03175d6ba3b091 (diff)
parentc7ce6a1b56ee7dcc1896250df0f2f9deaa828a81 (diff)
Merge branch 'master' into port-async-migration-routines
# Conflicts: # Jellyfin.Server/Migrations/Routines/20260915120000_MigrateRatingLevels.cs
Diffstat (limited to 'MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs')
-rw-r--r--MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs b/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs
index fba644b74a..27a987fefe 100644
--- a/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs
+++ b/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs
@@ -188,6 +188,14 @@ namespace MediaBrowser.MediaEncoding.Subtitles
_logger.LogDebug("charset {CharSet} detected for {Path}", detected.EncodingName, fileInfo.Path);
+ // If encoding is not supported by .NET (e.g., ISO-8859-16), return stream as-is
+ // The charset name will be passed to ffmpeg via -sub_charenc if needed
+ if (detected.Encoding is null)
+ {
+ _logger.LogWarning("Encoding {Encoding} is not supported by .NET for {Path}, returning stream as-is", detected.EncodingName, fileInfo.Path);
+ return stream;
+ }
+
await using (stream.ConfigureAwait(false))
{
using var reader = new StreamReader(stream, detected.Encoding);