Validate integrated FFmpeg video hardening stack - #146
Draft
Blackspirits wants to merge 1 commit into
Draft
Blackspirits wants to merge 1 commit into
Blackspirits wants to merge 1 commit into
Conversation
Blackspirits
commented
Sep 16, 2026
Blackspirits
left a comment
Owner
Author
There was a problem hiding this comment.
Final adversarial integration review on 0d5b86186568ff1e9dcda42c30e6190ff00ce048 after CI SubtitleEdit#285: no blocker found. Verified replay-serial filtering precedes decoder serial/send, failed seeks do not falsely commit replay state, successful seek serial commit composes with #133 publication fencing, #132 prevents flush-time object reuse, #141 closes detached lastDropped ownership, and #119 EAGAIN packet ownership/freeing remains unchanged. The pre-PR paused-position omission was corrected before this run. Evidence-only PR; no merge/promotion 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.
Purpose
Integration-only validation of the current FFmpeg video hardening stack.
The base is #145, so it already includes:
This integration commit layers the final audited behavior from:
lastDroppedseek frames on every video-loop exit.It is audit evidence only and is not a merge candidate.
Current upstream
SubtitleEdit/subtitleeditmain was rechecked at6c6b83dd043d8d38fb7a2b1800fdb9465526833b; the current upstream delta is Burn-in/encoder-settings work and does not touch this player stack.Why this integration matters
These fixes all manipulate the same three pieces of state at different layers:
Passing them independently is not sufficient to prove that their lock/order assumptions still compose.
Invariants validated by this tree
Hardware fallback never feeds old compressed packets into the fresh software decoder.
Wait for a fresh FFmpeg replay serial after hardware fallback #145's replay-serial gate remains before decoder serial switching and packet send.
Native seek failure does not falsely commit replay state.
Fail closed when FFmpeg seek fails #117 makes
PerformSeektransactional. If the hardware-replay seek itself fails, the committed old serial is preserved; Wait for a fresh FFmpeg replay serial after hardware fallback #145 therefore keeps rejecting old-serial packets. This is deliberately fail-closed.Successful seek commits the serial before old decoded frames can publish.
Fence FFmpeg frame publication by seek serial #133's
ShowFrameholds the same seek lock used to commit_currentSerial.Seek flush cannot recycle an object still held by the presenter.
Do not recycle FFmpeg frames removed by seek flush #132 disposes queued frames rather than immediately pooling them.
Detached seek-frame ownership is closed on every video-loop exit.
Release detached FFmpeg seek frame on video-loop exit #141 returns
lastDroppedfromfinally.EAGAIN ownership from Retry FFmpeg decoder packets rejected with EAGAIN #119 is preserved.
The integration does not alter retained/retried packet ownership or exact-once freeing.
Integration reconciliation
Three textual overlaps required manual reconciliation:
lastDroppeddeclaration vs Wait for a fresh FFmpeg replay serial after hardware fallback #145'sminimumReplaySerial.These were resolved by semantic intent, not line-number preference.
During pre-PR adversarial review the first reconstruction also caught and corrected one integration-only regression: the
else if (!_playing) _pausedPosition = frame.Ptsbranch from final #133 had initially been omitted while rebuildingShowFrame. The current HEAD restores it exactly before this PR was opened.Scope / branch state
ed2e6129d4c84ed0651941331e080dcc559050f10d5b86186568ff1e9dcda42c30e6190ff00ce0486c6b83dd043d8d38fb7a2b1800fdb9465526833bAI assistance: ChatGPT was used to perform the cross-branch semantic reconciliation, detect the initial paused-position integration omission, and design the integration acceptance review.
Final CI
Authoritative run: SubtitleEdit#285 on
0d5b86186568ff1e9dcda42c30e6190ff00ce048Final adversarial review was performed on this exact integrated HEAD after CI; all six composition invariants above remain satisfied.