Skip to content

deps.ffmpeg: Update FFmpeg to 8.1.3 - #2

Merged
zackees merged 1 commit into
obs-rust:masterfrom
rdoupe:deps/ffmpeg-8.1.3
Oct 25, 2026
Merged

zackees merged 1 commit into
obs-rust:masterfrom
rdoupe:deps/ffmpeg-8.1.3

Conversation

@rdoupe

@rdoupe rdoupe commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Description

Update FFmpeg from 8.1.2 to 8.1.3 in deps.ffmpeg (macOS/Linux 99-ffmpeg.zsh, Windows 99-ffmpeg.ps1).

  • The pin moves from 38b88335f99e (n8.1.2) to 1041abdc962f4cc4f394aa8de9dc5236c0c3b9e7, the commit the n8.1.3 tag points to. The source is still the git repository at a fixed commit, as before.
  • 0001-flvdec-handle-unknown.patch / -Windows.patch: unchanged. libavformat/flvdec.c is identical in n8.1.2 and n8.1.3, and the patch applies with no fuzz. It is still needed: n8.1.3 still turns an unknown FLV script tag into a data stream instead of skipping it.
  • 0002-libaomenc-presets.patch / -Windows.patch: rebased. The change is the same (the cpu-used maximum goes from 8 to 10); only the line numbers and one context line differ. The old hunk applied only with fuzz 1, because the #define OFFSET context line had moved. That was already the case on n8.1.2, since libavcodec/libaomenc.c is also identical in n8.1.2 and n8.1.3. It is still needed: upstream still caps cpu-used at 8, and the OBS AOM encoder offers presets 9 and 10. The Windows file keeps its CRLF line endings. Both patch hashes are updated in the scripts.
  • Configure options are unchanged on every target.

Motivation and Context

FFmpeg 8.1.3 fixes these public CVEs, all of which affect 8.1.2 (tracked in obs-rust/obs-studio#1091):

CVE Component CVSS
CVE-2026-64830 VobSub demuxer 8.8
CVE-2026-64832 NVDEC (only with hardware decoding on) 8.8
CVE-2026-64835 ADX decoder 8.8
CVE-2026-66039 MACE6 decoder (CAF) 7.8
CVE-2026-65703 TDSC decoder 7.8
CVE-2026-70632 CFHD decoder 7.8
CVE-2026-70628 DVB subtitle parser 7.8
CVE-2026-58049 RASC decoder 8.6
CVE-2026-75146 DASH demuxer 8.1

These are memory-corruption bugs in decoders and demuxers. The Media Source and the image loader open files with full format probing, so a crafted file can reach any of them. The DASH demuxer needs libxml2, which obs-deps does not enable, so CVE-2026-75146 does not affect these builds. The fixes are the cherry-picks in n8.1.2..n8.1.3 (268 commits), for example 4fe710047d (VobSub), 9cbcf979a5 (NVDEC), 852b0552f0 (ADX), 228fd8f0ca (MACE), 2aee0b0ba6 (TDSC), 9736daf9a9 (CFHD), 46ef25c9c2 (DVB subtitles) and cf148db1a8 (RASC).

The Linux AppImage gets the same update in obs-rust/obs-studio-libs#5.

How Has This Been Tested?

Source. n8.1.3 resolves to 1041abdc962f4cc4f394aa8de9dc5236c0c3b9e7 on both github.com/FFmpeg/FFmpeg and git.ffmpeg.org. The annotated tag has a good signature from the same release key (ed25519 DD1EC9E8DE085C629B3E1846B18E8928B3948D64) that signed n8.1.2. n8.1.2 is an ancestor of n8.1.3.

Patches. Each patch was applied to a fresh export of n8.1.3 with GNU patch, using the same steps as apply_patch and Safe-Patch: a reverse dry run, then -g 0 -f -p1. Every patch also applies with --fuzz=0, and after applying, the reverse dry run detects it, so a second run skips it. The macOS and Windows sets produce byte-identical trees. The Windows files were also applied with --binary to CRLF copies of the target files, the way patch.exe --binary sees them. The result is the same as the old 0002 gave with fuzz, apart from the line endings. The HashSum/hash values match the committed files.

Build (Linux x86_64, clang 22). obs-deps does not build Linux packages, and the host has no zsh, so the linux-x86_64 path of 99-ffmpeg.zsh was reproduced in bash: the same configure arguments and Release flags (-w -pipe -fPIC -O3 -g -DNDEBUG), clang as the compiler, and a shared build.

  • mbedTLS 3.6.4, libsrt 1.5.2, librist 0.2.7 and nv-codec-headers 13.0.19.0 were built at their obs-deps pins, with their obs-deps patches and options.
  • The codec libraries (x264, aom 3.15, SVT-AV1 4.2, libvpx 1.17, opus, vorbis, theora, lame, zlib) came from the host system. So PKG_CONFIG_LIBDIR also listed the system pkg-config directories, and --pkg-config-flags=--static was left out. The CI static type uses it, but the host has no static codec libraries.
  • n8.1.2 with the current patches and n8.1.3 with this PR's patches were each configured, built and installed with exactly the same arguments, apart from the install prefix.

Results, n8.1.2 compared with n8.1.3:

  • The configure output is identical (same external libraries: libaom, libsvtav1, libx264, libvpx, libopus, libvorbis, libtheora, libmp3lame, librist, libsrt, and nvenc/nvdec/cuvid through ffnvcodec), and so is the set of CONFIG_*/HAVE_* features enabled in config.mak (2357 of them).
  • The ABI is unchanged: every library has the same SONAME (avcodec 62, avformat 62, avutil 60, avfilter 11, avdevice 62, swscale 9, swresample 6) and the same set of exported symbols.
  • FATE (make fate, no external samples): n8.1.3 passes 2611/2611, and n8.1.2 passes 2607/2607. The 4 extra tests are new upstream ones (ffmpeg-negative-t, ffmpeg-negative-input-t, filter-scale-fast-bilinear-wide-edge, rename).

The patches still work on n8.1.3:

  • 0002: ffmpeg -h encoder=libaom-av1 lists cpu-used as "from 0 to 10". Realtime encodes with -cpu-used 9 and -cpu-used 10 succeed, and -cpu-used 11 is rejected as out of range.
  • 0001: an FLV file with an unknown onObsTest script-data tag added after the video tags probes as audio and video only with this build. Stock FFmpeg 9.0.1, without the patch, adds a third data stream for it. Remuxing the file with -map 0 -c copy works.

Not tested here. No Windows or macOS build was run: the Windows test machine was not available, and there is no macOS machine. The MSVC (Windows) and VideoToolbox (macOS) parts of configure were not exercised. They are covered by the follow-ups below.

Follow-ups

  1. Cut a new obs-deps release that contains this change, so the CI-built Windows and macOS packages exist.
  2. In obs-studio, bump the deps version and hashes in CMakePresets.json to that release.
  3. Windows and macOS A/B product checks with the full app, comparing the current deps against the new release: Media Source playback (local files, looping, seeking, hardware decoding on and off, including NVDEC on Windows), image sources, recording and streaming with the FFmpeg-based encoders (including AOM AV1 presets 9 and 10), and SRT/RIST Media Sources. These should match the Linux AppImage A/B run for ffmpeg 8.1.3 r4 obs-studio-libs#5.

This change is independent of the libsrt update in #1. The two touch different files and can merge in either order.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

AI note: Claude Code (Claude Opus 5.5) wrote the patch changes, the checks, the commit message and this text under the submitter's direction, and ran the builds and tests above on the submitter's machines.

🤖 Generated with Claude Code

@rdoupe

rdoupe commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

Like #3, this branch predates #5 (the libvpx/NASM 3.02 Windows fix), so its Windows FFmpeg jobs still build the old libvpx; please rebase onto master or re-run after merging master. This is the Windows/macOS half of obs-rust/obs-studio#1091 (FFmpeg 8.1.3 public CVE fixes); the AppImage half is pinned in obs-rust/obs-studio#1880. If the macOS arm64 FFmpeg job still fails after the rebase, I'll look at it.

Update FFmpeg from 8.1.2 to 8.1.3 (n8.1.3, commit 1041abdc962f). The
8.1.3 point release fixes these public CVEs, all of which affect 8.1.2:
 * CVE-2026-64830: VobSub demuxer
   https://nvd.nist.gov/vuln/detail/CVE-2026-64830
 * CVE-2026-64832: NVDEC
   https://nvd.nist.gov/vuln/detail/CVE-2026-64832
 * CVE-2026-64835: ADX decoder
   https://nvd.nist.gov/vuln/detail/CVE-2026-64835
 * CVE-2026-66039: MACE6 decoder (CAF)
   https://nvd.nist.gov/vuln/detail/CVE-2026-66039
 * CVE-2026-65703: TDSC decoder
   https://nvd.nist.gov/vuln/detail/CVE-2026-65703
 * CVE-2026-70632: CFHD decoder
   https://nvd.nist.gov/vuln/detail/CVE-2026-70632
 * CVE-2026-70628: DVB subtitle parser
   https://nvd.nist.gov/vuln/detail/CVE-2026-70628
 * CVE-2026-58049: RASC decoder
   https://nvd.nist.gov/vuln/detail/CVE-2026-58049
 * CVE-2026-75146: DASH demuxer (not built here: needs libxml2)
   https://nvd.nist.gov/vuln/detail/CVE-2026-75146

Patch changes:
 * 0001-flvdec-handle-unknown: Unchanged. libavformat/flvdec.c is the
   same in n8.1.2 and n8.1.3, the patch applies without fuzz, and it is
   still needed: upstream still turns unknown FLV script tags into a
   data stream instead of skipping them.
 * 0002-libaomenc-presets: Rebased (same change, new line numbers and
   context). The old hunk only applied with fuzz 1 because the
   "#define OFFSET" context line moved; that was already the case on
   n8.1.2, where libaomenc.c is also unchanged. Still needed: upstream
   still caps cpu-used at 8, and OBS offers AOM presets 9 and 10.

Configure options are unchanged.

Refs obs-rust/obs-studio#1091

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@rdoupe
rdoupe force-pushed the deps/ffmpeg-8.1.3 branch from 551ec2d to 79f0a10 Compare October 23, 2026 08:41
@rdoupe

rdoupe commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto master (now includes #5, the libvpx/NASM 3.02 Windows fix); head is 79f0a10. The earlier Windows failures were the old libvpx build.

@rdoupe

rdoupe commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

After the rebase all FFmpeg jobs pass, Windows x64/arm64 and macOS included (21/21; Universal is the expected skip). Ready for review.

@zackees zackees left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coordinator review: LGTM. FFmpeg 8.1.2 -> 8.1.3: version/commit bumped in both .ps1 and .zsh, the libaomenc preset patch rebased to the new hunk offset (same change) with both HashSums updated. All FFmpeg jobs green after the rebase. Verdict: approve.

@zackees
zackees merged commit 7745612 into obs-rust:master Oct 25, 2026
22 checks passed
@obs-rust-project-manager obs-rust-project-manager Bot moved this from Ready to merge to Done in obs-rust Multiview Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants