diff options
| author | Piotr Niełacny <piotr.nielacny@gmail.com> | 2026-07-15 14:55:55 +0200 |
|---|---|---|
| committer | Piotr Niełacny <piotr.nielacny@gmail.com> | 2026-07-15 14:55:55 +0200 |
| commit | 6e3c1874936b767754cd9267749f35b27f2ae65f (patch) | |
| tree | 29570055389ab314bbb7b04908f7d8ab5db88d14 /MediaBrowser.Controller/Library/IUserDataManager.cs | |
| parent | cfeaef61806525f85ad42f95961e1294a66e7944 (diff) | |
Fix race condition in concurrent subtitle conversion
SubtitleEncoder.ConvertSubtitles parsed subtitles with libse's static
Subtitle.Parse, which iterates a statically cached list of shared
SubtitleFormat instances. Format parsers keep mutable per-parse state on
the instance, so concurrent subtitle requests corrupted each other's
output (cues mixed across streams and languages, truncated files) or
failed with NullReferenceException when format detection broke down and
Subtitle.Parse returned null.
Parse through the injected ISubtitleParser instead. SubtitleEditParser
instantiates a fresh format parser per call, so requests no longer share
state. Its Parse method now returns the libse Subtitle directly (the
SubtitleTrackInfo flattening was unused since the SubtitleEdit writer
rework) so the writers keep full fidelity such as ASS styling.
Diffstat (limited to 'MediaBrowser.Controller/Library/IUserDataManager.cs')
0 files changed, 0 insertions, 0 deletions
