fix(ffmpeg): fix vulkan encode feedback flags check before capabilities query#669
Merged
ReenigneArcher merged 1 commit intoApr 29, 2026
Merged
Conversation
The feedback flags check added in FFmpeg 735c84b57f reads enc_caps.supportedEncodeFeedbackFlags before GetPhysicalDeviceVideoCapabilitiesKHR populates the struct, so the flags are always zero and the check always fails with 'Driver does not support required encode feedback flags'. Move the check to after the capabilities query.
77fec43 to
9f6c240
Compare
|
Member
|
Don't worry about the whitespace lint |
2 tasks
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.



Description
The feedback flags check added in FFmpeg commit
735c84b57f("vulkan: fix encode feedback query handling") readsctx->enc_caps.supportedEncodeFeedbackFlagsat line 775, butGetPhysicalDeviceVideoCapabilitiesKHRdoes not populateenc_capsuntil line 863. Since the struct is zero-initialized, the bitmask test always fails and all Vulkan encoders (h264_vulkan, hevc_vulkan, av1_vulkan) are broken on every driver:The patch moves the check to after the capabilities query where
enc_capsis valid.Tested with AMD Radeon RX 9070 XT (RADV GFX1201) and AMD Radeon 780M (RADV PHOENIX), Mesa 26.2.0-devel. Both work after the fix.
This bug exists in upstream FFmpeg on both
masterandrelease/8.1— reported as https://code.ffmpeg.org/FFmpeg/FFmpeg/issues/22967.Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage