Fix crash applying a Movit filter to an fx_cut - #1297
Merged
Merged
Conversation
Playlist fx_cut frames skipped mlt_producer_get_frame, so _producer was unset and Movit keyed the chain with a NULL unique id. Pulling mlt_image_movit from another producer also shared an in-progress GPU chain onto the cut. Finalize that chain to rgba64 before sharing, do not copy producer-keyed _movit state across the boundary, and upload rgba64 as GL_UNSIGNED_SHORT so 10-bit OpenGL filters on an Adjustment Clip are not distorted.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Cross-producer sharing can still expose an incomplete Movit chain, and same-producer paths incur unnecessary GPU round trips.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Fixes Movit crashes and color distortion when processing fx_cut adjustment clips.
Changes:
- Associates
fx_cutframes with their producer. - Finalizes cross-producer Movit chains as 16-bit RGBA.
- Adds safer Movit chain lookups and null handling.
File summaries
| File | Description |
|---|---|
src/modules/movit/mlt_movit_input.cpp |
Uploads rgba64 as 16-bit data. |
src/modules/movit/filter_movit_convert.cpp |
Hardens chain lookup and producer handling. |
src/framework/mlt_producer.c |
Handles null cut-parent inputs. |
src/framework/mlt_playlist.c |
Sets the producer on fx_cut frames. |
src/framework/mlt_frame.c |
Controls Movit state sharing across producers. |
NEWS |
Documents the fixes. |
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 3
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…chain Do not hand an in-progress Movit chain back across get_image_with_fx_cut. Only flatten mlt_image_movit when original producers differ, so single-track tractor prepends keep the GPU chain. Store FlatInput's GL type so rgba64 upload and set_pixel_data stay in lockstep. Add a movit.saturation fx_cut test that QSKIPs when the module is unavailable.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new regression test always skips because its fixture never initializes the required GLSL manager and OpenGL context.
Get a fresh assessment by requesting another Copilot review.
Review details
- Files reviewed: 8/8 changed files
- Comments generated: 1
- Review effort level: Balanced
ddennedy
force-pushed
the
fix-fx-cut-movit
branch
from
September 12, 2026 19:33
e951e23 to
4930895
Compare
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.
Playlist fx_cut frames skipped mlt_producer_get_frame, so _producer was unset and Movit keyed the chain with a NULL unique id. Pulling mlt_image_movit from another producer also shared an in-progress GPU chain onto the cut.
Finalize that chain to rgba64 before sharing, do not copy producer-keyed _movit state across the boundary, and upload rgba64 as GL_UNSIGNED_SHORT so 10-bit OpenGL filters on an Adjustment Clip are not distorted.