Repository navigation
Conversation
…p stream-change retries configure_output accepted the first PCM16/Float32 type regardless of MF_MT_AUDIO_NUM_CHANNELS and then overwrote self.channels, so a multistream interleave could index past the buffer; drain_output retried MF_E_TRANSFORM_STREAM_CHANGE forever. Output types whose channel count differs from the decoder's are now skipped, and more than 4 stream changes is an error.
Owner
Author
|
Upstream PR xcl-dev#926 was closed or merged. |
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.
Part 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
Mirror of xcl-dev#926 (auto-synced, do not edit).