Drop browser codec preloads from yt-dlp host - #10513
Open
Drecullith wants to merge 1 commit into
Open
Conversation
Drecullith
force-pushed
the
fix/chromium-ytdlp-preload
branch
from
September 6, 2026 22:05
47efdaa to
7805e5d
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.
Summary
Chromium-family browsers can inject browser-specific codec libraries into native messaging hosts through environment variables such as
LD_PRELOADandVIVALDI_PRELOADS.When
omarchy-chromium-ytdlp-hostinherits those variables, child processes such asyt-dlpandffmpeginherit them too. With Vivaldi's proprietary codec setup, this can make the systemffmpegload Vivaldi's bundledlibffmpeg.so, causing ffmpeg to crash and preventing yt-dlp from merging downloaded streams.This change clears the browser-only preload variables immediately when the native messaging host starts:
LD_PRELOADVIVALDI_PRELOADSThis keeps browser codec injection from leaking into yt-dlp, ffmpeg, or other helper processes spawned by the host.
Fixes #10469.
Testing
Added
test/shell.d/chromium-ytdlp-preload-test.shwhich starts the native host with fake values for both preload variables and verifies that neither remains in the host environment.Also verified the final change is limited to the native host and its focused regression test.