Prevent stale FFmpeg loads from publishing after close or replacement - #92
Closed
Blackspirits wants to merge 1 commit into
Closed
Blackspirits wants to merge 1 commit into
Blackspirits wants to merge 1 commit into
Conversation
Owner
Author
|
Superseded by current-base draft PR #95. Upstream changed FfmpegPlayer materially after this draft, and the first generation-based fix was itself strengthened during adversarial review to prevent stale cleanup from erasing a newer Session's frame. #95 carries the corrected current-base version and has full green CI. Closing this older draft; no merge performed. |
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.LoadFilecreates its nativeSessioninsideTask.Run.VideoPlayerControl.Openawaits that task, and the control explicitly allows teardown/layout rebuild/fullscreen transitions to happen while the await is in progress.Previously
CloseFilecould only dispose the already-published_session. A slowSessionstill being constructed was invisible to it. That creates two races:_session, resurrecting the wrong media file.This change:
Validation
f67b07f5b143fa47c87255ca1c3ed7adb3bd7142VideoPlayerControl.Openexplicitly documents that teardown can happen whileLoadFileis awaitedFfmpegPlayer.CloseFilehad no token/generation/cancellation state for a Session still being constructedAI assistance: ChatGPT was used to audit asynchronous FFmpeg session ownership across open, close, dispose and overlapping-load paths.