Skip to content

build: stop silently falling back to the latest build-deps release - #5645

Open
sresarehumantoo wants to merge 1 commit into
LizardByte:masterfrom
sresarehumantoo:build/ffmpeg-release-tag-fallback
Open

build: stop silently falling back to the latest build-deps release#5645
sresarehumantoo wants to merge 1 commit into
LizardByte:masterfrom
sresarehumantoo:build/ffmpeg-release-tag-fallback

Conversation

@sresarehumantoo

Copy link
Copy Markdown

Description

cmake/dependencies/ffmpeg.cmake resolves the prebuilt FFmpeg release from the third-party/build-deps submodule's git tag; when it cannot resolve one it downloads releases/latest silently instead. On non-Windows, nv-codec-headers come from the pinned submodule (cmake/compile_definitions/common.cmake:217) while the prebuilt binaries come from whatever release was downloaded, so a fallback pairs mismatched halves and the build stops being reproducible. A normal recursive clone is unaffected. Source tarballs, tagless or shallow clones, and any build-deps dir that is not a git repo take the fallback.

This was found in a downstream fork, where a Video Codec SDK guard tripped after the bundled nvEncodeAPI.h moved 13.0 → 13.1; upstream's exposure is the header/binary pairing rather than that guard.

The goal of the change is to honor an explicitly supplied -DFFMPEG_RELEASE_TAG and make the fallback a WARNING naming the failure mode rather than a STATUS line. Behavior when the tag resolves normally is unchanged.

All three paths verified, tag resolvable (unchanged), tag unresolvable (warns, still configures), tag unresolvable + -DFFMPEG_RELEASE_TAG is honored.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

See our AI usage policy.

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

When cmake cannot resolve a tag for the third-party/build-deps submodule it
quietly downloads the LATEST build-deps release instead. The build then pairs
prebuilt FFmpeg binaries from one release with the nv-codec-headers taken from
the pinned submodule, so what gets linked no longer matches what the pin says,
and the build stops being reproducible.

A normal recursive clone resolves the tag and is unaffected. It is source
tarballs, tagless or shallow clones, and any build-deps directory that is not a
git repository that silently take the fallback, and the resulting breakage
surfaces far from its cause: a Video Codec SDK version guard tripping is a
typical symptom, which points at the NVENC code rather than at the dependency
that was swapped underneath it.

Honor an explicitly supplied FFMPEG_RELEASE_TAG so the release can be pinned
without git, and turn the fallback into a warning that names the failure mode
rather than a status line that reads like business as usual. Behavior when the
tag resolves normally is unchanged.

Verified all three paths: tag resolvable (unchanged), tag unresolvable (warns
and still configures), and tag unresolvable with -DFFMPEG_RELEASE_TAG set
(honored).
@sonarqubecloud

sonarqubecloud Bot commented Sep 8, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant