fix(engine): hold the last video frame at the inclusive clip end#1563
Closed
calcarazgre646 wants to merge 1 commit into
Closed
fix(engine): hold the last video frame at the inclusive clip end#1563calcarazgre646 wants to merge 1 commit into
calcarazgre646 wants to merge 1 commit into
Conversation
The frame-lookup active set deactivated a video on an exclusive end-bound (globalTime < end), while the runtime keeps an element visible through currentTime <= end (core/runtime init.ts). The rendered frame landing exactly on a clip's end went blank even though the runtime still showed the element on its final frame: one blank frame at the end of every clip whose end lands on a frame boundary. Make the active window inclusive of the end to match the runtime, and at t === end serve the last extracted frame (the runtime holds the element's final frame there too). Mid-clip source exhaustion (t < end) stays blank, unchanged.
Collaborator
|
Thanks for catching this — real bug, correct fix. We've incorporated your changes into #1564 with one additional consistency fix ( |
Contributor
Author
|
Thanks for folding it in, and good call on the getFrame alignment. That accessor was the one path I left on the old exclusive bound, so good to have both consistent now. |
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.
Problem
The
FrameLookupTableactive set deactivated a video on an exclusive end-bound (globalTime < end), while the runtime keeps an element visible throughcurrentTime <= end(core/runtime/init.ts). So the rendered frame landing exactly on a clip's end went blank, even though the runtime still showed the element on its final frame. That is one blank frame at the end of every clip whose end lands on a frame boundary (e.g. a 2s clip starting at 1.0s in a 30fps render: frame 90 = t 3.0 = end).The injector hides both the native
<video>and the__render_frame__image with!importantwhen a video is inactive, so the runtime's non-importantvisibility: visiblecannot show through either — the region renders blank for that frame.Change
Make the active window inclusive of the end (
globalTime <= end) to match the runtime, and att === endserve the last extracted frame, mirroring the runtime holding the element's final frame there. Mid-clip source exhaustion (t < end, the deliberate blank-tail) is unchanged.This is the same render-vs-runtime boundary alignment as #1339 / #1340, applied to the video frame injector.
Tests
videoFrameExtractor.test.ts: holds the last frame att === endfor a well-matched clip; holds it at the end even when the source is shorter than the window, while the mid-clip tail stays blank (the existing blank-tail test still passes); adjacent clips are both active at a shared boundary, matching the runtime. Full engine suite green (745 tests).