Просмотр исходного кода

Backport pull request #15690 from jellyfin/release-10.11.z

Fix: Add .ts fallback for video streams to prevent crash

Original-merge: 2a0b90e3852edae22d9f7cec197e6e81e9415632

Merged-by: crobibero <cody@robibe.ro>

Backported-by: Bond_009 <bond.009@outlook.com>
martenumberto 15 часов назад
Родитель
Сommit
1af1c72e81
2 измененных файлов с 8 добавлено и 0 удалено
  1. 1 0
      CONTRIBUTORS.md
  2. 7 0
      Jellyfin.Api/Helpers/StreamingHelpers.cs

+ 1 - 0
CONTRIBUTORS.md

@@ -208,6 +208,7 @@
  - [GeneMarks](https://github.com/GeneMarks)
  - [Kirill Nikiforov](https://github.com/allmazz)
  - [bjorntp](https://github.com/bjorntp)
+ - [martenumberto](https://github.com/martenumberto)
 
 # Emby Contributors
 

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

@@ -159,6 +159,13 @@ public static class StreamingHelpers
 
         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))
         {
             containerInternal = streamingRequest.Container;