Skip to content

Restore SDL2 + libopenal (avdevice deps); Redist 7.1.3#5

Merged
oysteinkrog merged 1 commit into
InitialForce:masterfrom
oysteinkrog:DESKTOP-12084-restore-avdevice-deps
Jul 5, 2026
Merged

Restore SDL2 + libopenal (avdevice deps); Redist 7.1.3#5
oysteinkrog merged 1 commit into
InitialForce:masterfrom
oysteinkrog:DESKTOP-12084-restore-avdevice-deps

Conversation

@oysteinkrog

Copy link
Copy Markdown
Member

What this does

Restores SDL2.dll and libopenal-1.dll to the FFmpeg.AutoGen.Redist native payload and ships it as version 7.1.3. ffplay.exe stays dropped.

Why

The 7.1.2 slim repackaging removed ffplay.exe, SDL2.dll, and libopenal-1.dll on the premise that SDL2 + OpenAL were consumed only by ffplay.exe. That premise is wrong.

avdevice-if-61.dll links against SDL2.dll and libopenal-1.dll, and avdevice-if-61.dll is a static import of both ffmpeg.exe and ffprobe.exe. The Windows loader therefore resolves avdevice at process startup, which needs SDL2 + OpenAL; with them removed and absent from System32, every spawned ffmpeg/ffprobe invocation fails immediately with STATUS_DLL_NOT_FOUND (0xC0000135) before doing any work. 7.1.1 was immune only because its exes were statically linked (134 MB) and imported no av*-if DLLs. In-process FFmpeg.AutoGen bindings are unaffected because they never load avdevice.

objdump evidence on the 7.1.2 payload:

ffprobe.exe imports: avcodec-if-61 avdevice-if-61 avformat-if-61 avutil-if-59 swresample-if-5 swscale-if-8 avfilter-if-10 (+ KERNEL32/msvcrt/SHELL32)
ffmpeg.exe  imports: same set, including avdevice-if-61.dll
avdevice-if-61.dll imports: SDL2.dll  libopenal-1.dll  libcaca-0 libxml2-2 avcodec/avfilter/avformat/avutil-if + GDI32/ole32/...

A recursive dependency walk of the built output found exactly two DLLs missing from the whole graph: SDL2.dll and libopenal-1.dll. Adding them back flips the downstream MotionCatalyst FFmpeg test suite from 41 failed to 0.

What's in here

  • SDL2.dll (2.4 MB) and libopenal-1.dll (1.9 MB) restored into FFmpeg/bin/, extracted from the committed mingw-w64-x86_64-ffmpeg-if-bundled-7.1-1-any.pkg.tar.zst; byte-identical to the copies already present in FFmpeg/bin/x64/.
  • The SDL2.dll/libopenal-1.dll Exclude removed from both pack/copy ItemGroups in FFmpeg.AutoGen.Redist.csproj. ffplay.exe remains dropped (it is the one binary nothing else imports).
  • FFmpeg.AutoGen.Redist version bumped to 7.1.3.
  • verify_redist.py: forbidden set is now ffplay.exe + *.pdb only; the pe-imports gate additionally requires avdevice-if-61.dll in the exe import tables and still forbids a direct SDL2.dll import (which the exes correctly do not have). redist-manifest.txt regenerated (71 to 73 entries). Self-tests updated.

Net native payload is about 86 MB versus the 338 MB original 7.1.1, so the size win of the original slimming is preserved.

The genuinely correct long-term slim is to rebuild the IF bundle with avdevice disabled (or without its SDL/OpenAL device backends), letting the exes drop the avdevice import and shed SDL2 + OpenAL for real. That needs an FFmpeg rebuild and is out of scope here.

How to review

  • python scripts/test_verify_redist.py — 19 tests OK.
  • dotnet build FFmpeg.AutoGen.Redist -c Release && dotnet pack FFmpeg.AutoGen.Redist -c Release --no-build -o artifacts/nupkgs, then python scripts/verify_redist.py artifacts/nupkgs/FFmpeg.AutoGen.Redist.7.1.3.nupkg --expected-version 7.1.3 — all six gates PASS.

Fixes: DESKTOP-12084

The 7.1.2 slim repack dropped SDL2.dll and libopenal-1.dll on the premise
they were ffplay-only. They are not: avdevice-if-61.dll links both, and
avdevice is a static import of ffmpeg.exe/ffprobe.exe, so the shared-linked
exes fail at startup with STATUS_DLL_NOT_FOUND (0xC0000135) without them.
ffplay.exe stays dropped (nothing else imports it).

Restore both DLLs into FFmpeg/bin, drop the Exclude from the Redist pack
globs, bump to 7.1.3. Update verify_redist forbidden list to ffplay.exe +
*.pdb only, require avdevice-if-61.dll in the exe pe-imports gate, and
regenerate redist-manifest.txt (71 -> 73 entries).

Fixes: DESKTOP-12084

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@oysteinkrog oysteinkrog merged commit 2bec948 into InitialForce:master Jul 5, 2026
1 check passed
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