jellyfin/MediaBrowser.MediaEncoding
gnattu e2586eed9b Fix concurrent ffmpeg segment racing
This is a nasty one. The failure mode is:

1. Request A started FFmpeg and waited for a segment.
2. Request B requested an earlier or far away segment.
3. Jellyfin thought FFmpeg should to restart at a different position.
4. Request B killed the existing transcoding job.
5. Killing that job cancelled the same token request A was using.
6. The cancellation produced http 500 to request A.

To fix this:

we lock transcoding job state changes and segment handling per playlist, and use a thread safe counter to track how many http responses are still using each job’s segments. A job is only stopped or replaced once that counter reaches zero.
2026-08-05 00:33:42 +08:00
..
Attachments Apply review suggestions 2026-07-21 14:30:55 +02:00
BdInfo Backport pull request #15582 from jellyfin/release-10.11.z 2025-12-03 14:04:24 -05:00
Configuration Validate encoder path (#14996) 2025-10-13 14:16:05 -06:00
Encoder Drain stderr and stdout concurrently for encoder validation 2026-07-24 20:01:01 +08:00
Probing Merge pull request #17399 from Shadowghost/fix-extra-year 2026-07-25 12:52:51 -04:00
Properties
Subtitles Fix subtitle encoding for local files (#17281) 2026-07-21 14:52:59 +02:00
Transcoding Fix concurrent ffmpeg segment racing 2026-08-05 00:33:42 +08:00
MediaBrowser.MediaEncoding.csproj Follow native interoperability best practices 2026-06-15 21:01:28 +02:00