mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #15690] [MERGED] Fix: Add .ts fallback for video streams to prevent crash #14388
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/15690
Author: @martenumberto
Created: 12/1/2025
Status: ✅ Merged
Merged: 12/4/2025
Merged by: @crobibero
Base:
release-10.11.z← Head:fix-streams-without-fileextensions📝 Commits (4)
f442f70Fix: Add .ts fallback for video streams to prevent crash42c1295Change Logik for LiveStreams without File Extensionb6507c8Removed Comments8fa6aa9Also check mediaSource.IsInfiniteStream for LiveTV fallback since LiveStreamId can be null in some cases📊 Changes
2 files changed (+8 additions, -0 deletions)
View changed files
📝
CONTRIBUTORS.md(+1 -0)📝
Jellyfin.Api/Helpers/StreamingHelpers.cs(+7 -0)📄 Description
Describe the changes
This PR adds a defensive fallback to
Jellyfin.Api.Helpers.StreamingHelpers.GetOutputFileExtension.When handling a video request where:
mpeg2video),MediaSource.Containeris not yet populated (due to race conditions during initial probing),...the server currently throws an
InvalidOperationException, resulting in an HTTP 500 error and playback failure.This change adds a default fallback to
.ts(Transport Stream) for video requests when no other extension can be determined. This allows the stream to be passed to ffmpeg for remuxing/transcoding instead of crashing the request.Fixes
Fixes https://github.com/jellyfin/jellyfin/issues/15643
Duplicate of https://github.com/jellyfin/jellyfin/pull/15644 cause of rebase trouble.
How to test
http://provider/stream/12345?token=abc).StreamingHelpers(e.g.,mpeg2video) or trigger a cold start where probing data is missing.System.InvalidOperationException: Failed to find an appropriate file extensionand playback fails.Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.