aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model
diff options
context:
space:
mode:
authorNiels van Velzen <nielsvanvelzen@users.noreply.github.com>2026-01-26 12:00:14 +0100
committerGitHub <noreply@github.com>2026-01-26 12:00:14 +0100
commit360b6bcce1fc3f353ec23fa82ca415c3035b5710 (patch)
tree23851a7e6fdc8436e07436fff2c3d45d5360cdd6 /MediaBrowser.Model
parent92f3c8cf15b265020bca9386f434a8b968a338af (diff)
parent7f1a0ff6fce22d4e2f3919e92548d43cdc0229c9 (diff)
Merge pull request #14809 from lostb1t/fix/subtitleencoder
fix: prevent premature disposal of HTTP subtitle streams
Diffstat (limited to 'MediaBrowser.Model')
-rw-r--r--MediaBrowser.Model/Dlna/StreamInfo.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.cs
index 9edb4115c..551bee89e 100644
--- a/MediaBrowser.Model/Dlna/StreamInfo.cs
+++ b/MediaBrowser.Model/Dlna/StreamInfo.cs
@@ -1252,11 +1252,11 @@ public class StreamInfo
stream.Index.ToString(CultureInfo.InvariantCulture),
startPositionTicks.ToString(CultureInfo.InvariantCulture),
subtitleProfile.Format);
- info.IsExternalUrl = false; // Default to API URL
+ info.IsExternalUrl = false;
// Check conditions for potentially using the direct path
if (stream.IsExternal // Must be external
- && MediaSource?.Protocol != MediaProtocol.File // Main media must not be a local file
+ && stream.SupportsExternalStream
&& string.Equals(stream.Codec, subtitleProfile.Format, StringComparison.OrdinalIgnoreCase) // Format must match (no conversion needed)
&& !string.IsNullOrEmpty(stream.Path) // Path must exist
&& Uri.TryCreate(stream.Path, UriKind.Absolute, out Uri? uriResult) // Path must be an absolute URI