Repository navigation
Conversation
Keep hardware decoder state per FFmpegReader instance. Preserve the selected backend during pixel format negotiation. Fall back to software decoding when hardware device initialization fails. Improve hardware device context cleanup and retry handling. Add deterministic CUDA initialization failure regression coverage.
Contributor
Author
|
Hi @jonoomph, I would appreciate your review of this pull request, which addresses the CUDA hardware-decoder selection issue reported in #1017. The changes preserve explicit hardware-decoder selection, eliminate shared mutable decoder state, correct CUDA device indexing, and introduce a software-decoding fallback when hardware initialization fails. Validation completed:
The PR is currently mergeable without conflicts. Native Windows/macOS and CUDA-capable hardware testing remain areas for additional validation. Your feedback on the decoder initialization, fallback behavior, and cross-platform implications would be particularly valuable. Thank you for your time and consideration. |
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.
Summary
This pull request improves FFmpegReader hardware decoder selection, initialization, and fallback behavior.
Changes
Testing
Environment: Linux, hardware acceleration enabled.
git diff --check: passed.Expected behavior
When a selected hardware decoder cannot initialize, FFmpegReader should retry with software decoding rather than fail to open an otherwise decodable media file.
The decoder selection is maintained per reader to avoid unintended interference between readers.
Platform validation
Linux build and regression tests have passed. Native Windows and macOS builds have not yet been performed.