Browse Source

Fix: Add .ts fallback for video streams to prevent crash (#15690)

martenumberto 1 week ago
parent
commit
2a0b90e385
2 changed files with 8 additions and 0 deletions
  1. 1 0
      CONTRIBUTORS.md
  2. 7 0
      Jellyfin.Api/Helpers/StreamingHelpers.cs

+ 1 - 0
CONTRIBUTORS.md

@@ -205,6 +205,7 @@
  - [theshoeshiner](https://github.com/theshoeshiner)
  - [theshoeshiner](https://github.com/theshoeshiner)
  - [TokerX](https://github.com/TokerX)
  - [TokerX](https://github.com/TokerX)
  - [GeneMarks](https://github.com/GeneMarks)
  - [GeneMarks](https://github.com/GeneMarks)
+ - [martenumberto](https://github.com/martenumberto)
 
 
 # Emby Contributors
 # Emby Contributors
 
 

+ 7 - 0
Jellyfin.Api/Helpers/StreamingHelpers.cs

@@ -159,6 +159,13 @@ public static class StreamingHelpers
 
 
         string? containerInternal = Path.GetExtension(state.RequestedUrl);
         string? containerInternal = Path.GetExtension(state.RequestedUrl);
 
 
+        if (string.IsNullOrEmpty(containerInternal)
+            && (!string.IsNullOrWhiteSpace(streamingRequest.LiveStreamId)
+                || (mediaSource != null && mediaSource.IsInfiniteStream)))
+        {
+            containerInternal = ".ts";
+        }
+
         if (!string.IsNullOrEmpty(streamingRequest.Container))
         if (!string.IsNullOrEmpty(streamingRequest.Container))
         {
         {
             containerInternal = streamingRequest.Container;
             containerInternal = streamingRequest.Container;