demuxer: Fix demuxer assert logic and refactor FindFFmpeg#186
Open
crmurillo wants to merge 4 commits into
Open
demuxer: Fix demuxer assert logic and refactor FindFFmpeg#186crmurillo wants to merge 4 commits into
crmurillo wants to merge 4 commits into
Conversation
dabrain34
reviewed
Mar 30, 2026
dabrain34
reviewed
Mar 30, 2026
dabrain34
reviewed
Mar 30, 2026
dabrain34
reviewed
Mar 30, 2026
dabrain34
reviewed
Mar 30, 2026
dabrain34
reviewed
Mar 30, 2026
0d5c3c1 to
d0d2605
Compare
dabrain34
reviewed
Mar 30, 2026
5420320 to
22626b5
Compare
dabrain34
reviewed
Apr 2, 2026
7d59b8e to
0507fbc
Compare
0507fbc to
e89fe39
Compare
dabrain34
requested changes
Apr 24, 2026
3f07740 to
f6e3ebe
Compare
dabrain34
requested changes
Apr 27, 2026
df52774 to
bfd5e10
Compare
…ions The module searched for FFmpeg libraries twice (once via a macro, once via pkg-config + find_library) and used "FFMPEG" as the pkg-config prefix, which meant pkg-config wrote over the module's own output variables like FFMPEG_FOUND and FFMPEG_LIBRARIES. The following changes were made: - Replace with a single search pass using PC_FFMPEG as the pkg-config prefix. - Remove avdevice/x264/x265 since nothing links against them. - Drop the outdated Win32 stdint.h check. - Make swscale optional. - Split FFMPEG_INCLUDE_DIR into per-component include dirs and centralize search paths to eliminate duplication across find_library calls. - Move Windows FFmpeg discovery into FindFFmpeg. - Unify FFmpeg linking in demo and test targets to use FFMPEG_LIB* variables on all platforms.
When FFmpeg is not found and no codec is explicitly passed, codecType defaults to VK_VIDEO_CODEC_OPERATION_NONE_KHR). In release builds, the asserts validating this are stripped, causing the demuxer to silently proceed with invalid parameters and ultimately fail with a misleading "Video decode queue family not supported by hardware/driver" error. Replace asserts with explicit validation that returns VK_ERROR_FORMAT_NOT_SUPPORTED with descriptive error messages. Also print a hint when FFmpeg demuxer support is not available, since this is the most common cause of the failure.
Updated the list of skipped tests for the proprietary AMD driver (Windows).
No source file references swscale, therefore, the optional lookup was dead code. Drop it from the module.
bfd5e10 to
aa1a8d1
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.
Description
This PR addresses two issues:
When FFmpeg is not found at build time and no codec is explicitly passed at runtime, codecType defaults to VK_VIDEO_CODEC_OPERATION_NONE_KHR. The assert() calls validating this are stripped in release builds, so the demuxer silently proceeds with invalid parameters and fails with a misleading "Video decode queue family not supported" error. See linked issue for more details.
The FindFFmpeg.cmake module had two separate search passes for FFmpeg libraries: one via a custom FFMPEG_FIND macro and another via pkg_check_modules + find_library. It used FFMPEG as the pkg-config prefix, which caused pkg-config to overwrite the module's own output variables
Type of change
bug fix
Issue (optional)
Fixes #185.
Tests
NVIDIA GeForce RTX 4060 Ti / NVIDIA 595.44.00 / Ubuntu 24.04.4 LTS
Total Tests: 73
Passed: 62
Crashed: 0
Failed: 0
Not Supported: 9
Skipped: 2 (in skip list)
Success Rate: 100.0%
AMD Radeon RX 7600 (RADV NAVI33) / radv Mesa 26.1.0-devel (git-055aec542e) / Ubuntu 24.04.4 LTS
Total Tests: 73
Passed: 63
Crashed: 0
Failed: 0
Not Supported: 6
Skipped: 4 (in skip list)
Success Rate: 100.0%
Intel(R) UHD Graphics 770 (ADL-S GT1) / Intel open-source Mesa driver Mesa 26.1.0-devel (git-055aec542e) / Ubuntu 24.04.4 LTS
Total Tests: 73
Passed: 54
Crashed: 0
Failed: 0
Not Supported: 14
Skipped: 5 (in skip list)
Success Rate: 100.0%
AMD Radeon RX 6600 / AMD proprietary driver 26.3.1 (AMD proprietary shader compiler) / Windows 10
Total Tests: 73
Passed: 37
Crashed: 0
Failed: 0
Not Supported: 28
Skipped: 8 (in skip list)
Success Rate: 100.0%