mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-03 12:52:56 +01:00
When a client polls the HLS playlist (e.g. live.m3u8) after a live stream has been disposed because its consumer count dropped to zero, GetLiveStreamWithDirectStreamProvider returns a null MediaSource. The live branch of GetStreamingState then dereferenced it unconditionally, throwing a NullReferenceException and returning HTTP 500 for every poll until the client re-opens the stream. Guard against the null MediaSource and throw ResourceNotFoundException so the request returns 404 instead of crashing. Fixes #17009 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>