-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crash in PlayerCore.fileStarted, #3822
This commit will: - Add Atomic to PlaybackInfo.matchedSubs - Add a getMatchedSubs method to PlaybackInfo - Change AutoFileMatcher, PlayerCore and PlaylistViewController to hold a lock while accessing matchedSubs - Add Atomic to PlayerCore.backgroundQueueTicket - Change PlayerCore.fileStarted to hold a lock while incrementing backgroundQueueTicket - Add code to PlayerCore.stop that increments backgroundQueueTicket These changes insure the mutable Swift dictionary matchedSubs is only accessed by one thread at a time. Accessing a mutable dictionary from multiple threads without such coordination can result in a crash as seen in issue #3822. These changes also attempt to insure the background task that finds and loads subtitle files stops its work if playback is stopped before that process completes.
- Loading branch information
Showing
4 changed files
with
34 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters