Opus: only take MFT output types with the decoder's channel count, cap stream-change retries #926
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!926
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-926"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@DavidM1911 on GitHub · 2026-11-24 08:29 UTC · original
DavidM1911:opus-mft-guards→main· +10 −0 · 1 files · 1 commits · openPart of #327 (item 3).
Two guards on the Media Foundation MFT path in
crates/xcl/src/hle/opus.rs:MftDecoder::configure_outputaccepted the first PCM16/Float32 output type without checkingMF_MT_AUDIO_NUM_CHANNELSagainst the decoder's channel count, then overwroteself.channels— a multistream interleave sized for the expected count could index past the buffer if the MFT enumerated a different count first. Output types whose channel count differs are now skipped; a missingNUM_CHANNELSstill defaults to the decoder's count as before.MftDecoder::drain_outputretriedMF_E_TRANSFORM_STREAM_CHANGEin an unbounded loop; it now gives up after 4 reconfigurations.What is in it
crates/xcl/src/hle/opus.rsonly. No new unit test: both paths need a liveIMFTransform, which the crate's tests do not mock; the existing Opus/MFT tests still pass.Tested
x86_64-pc-windows-msvc:cargo test -p xcl --lib opus: 15 passed, 0 failedcargo test --workspace -- --test-threads=4: 676 passed, 0 failed, 41 ignoredscripts/smoke.ps1 -Seconds 60,cargo build --release -p xcl:main
a6f5f7a(same baseline as the sibling PRs; upstream/main is now2997c9a, docs-only on top):this PR's head
8d0176d:Not tested
AI use
github-bot referenced this pull request2026-11-26 04:59:09 +00:00
@SlopTart on GitHub · 2026-11-24 10:37 UTC · original
Linux / AMD RDNA3 datapoint.
Merged state: head
8d0176donto main9aec53d, clean merge.Full suite,
cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 717 passed, 7 failed, 41 ignored; failures are the known Wine-lane set from my #42 rows. Opus MFT output-type gating green.Not tested: retail titles (none here), Windows, RDNA4.
Counts only, no game data.
Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross
x86_64-pc-windows-gnu,XCL_NETWORK=0, release profile,--test-threads=4. My Linux rows: #42 / #718.AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
@throny on GitHub · 2026-11-25 10:16 UTC · original
Two contributors checked independently and found that #503 solves the same problem (for #327) in a different way: #1607, group D12. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.
This is a hint from the community triage in #1607, not a maintainer decision.
AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.