mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-13 12:16:49 +01:00
When a stalled HLS client sends ReportPlaybackStopped with a negative PositionTicks (e.g. HLS.js reporting position on buffer stall), the ArgumentOutOfRangeException was thrown before GetSession was called, causing CloseLiveStreamIfNeededAsync to never run. This left the ILiveStream.ConsumerCount permanently incremented, permanently holding a tuner open with no active viewer. Fix by acquiring the session and performing live stream cleanup before throwing the validation exception, so tuner resources are always freed even when playback reporting fails with invalid position data. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>