Prevent stale FFmpeg loads from publishing after close or replacement - #95
Draft
Blackspirits wants to merge 2 commits into
Draft
Prevent stale FFmpeg loads from publishing after close or replacement#95Blackspirits wants to merge 2 commits into
Blackspirits wants to merge 2 commits into
Conversation
Blackspirits
commented
Sep 13, 2026
Blackspirits
left a comment
Owner
Author
There was a problem hiding this comment.
Independent adversarial re-check on the revised concurrency patch: the first version still allowed an older load/close to clear a newer Session's first frame while disposing the previous Session. The final generation-safe cleanup fixes that race too: stale requests skip frame/file-name cleanup, Session publication is atomic with generation validation, and old failed loads cannot clobber newer state. Full CI #34778908588 passed restore, build and the complete suite on the first run; UITests reported 5,151 passed, 9 skipped and 0 failed. Retry was not used. No blocker identified. Keep draft; no merge performed.
This was referenced Sep 13, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FfmpegPlayer.LoadFilestill creates its native Session insideTask.Run, whileVideoPlayerControl.Openexplicitly permits teardown/layout/fullscreen transitions during the await.A Session that is still being constructed is invisible to
CloseFile. It can therefore publish after close, or an older overlapping load can overwrite a newer Session.This current-base port:
Validation
c77c4b428649ce7030e6cf218b4d7c384b955232AI assistance: ChatGPT was used to revalidate asynchronous Session ownership after upstream FFmpeg changes.