From ef01570c5deba96fd2f55cbc27842885513f6e91 Mon Sep 17 00:00:00 2001 From: Mike Solar Date: Sun, 30 Aug 2026 00:31:32 +0800 Subject: [PATCH] build: warn that ffmpeg-sys-next bundles the project FFmpeg into its rlib The sys crate's `static` feature copies the archives at BUILD time and cargo does not track archive changes: after rebuilding the project FFmpeg every binary silently keeps the previous objects until `cargo clean -p ffmpeg-sys-next` (observed: an NVDEC-capable rebuild never reached the binaries; av_hwdevice_ctx_create(CUDA) then failed with ENOMEM because the old hwdevice table had no CUDA entry). --- tooling/ffmpeg/build-ffmpeg.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tooling/ffmpeg/build-ffmpeg.sh b/tooling/ffmpeg/build-ffmpeg.sh index 3e02b4b09..2be587196 100755 --- a/tooling/ffmpeg/build-ffmpeg.sh +++ b/tooling/ffmpeg/build-ffmpeg.sh @@ -210,4 +210,11 @@ Done. To build Oak against this FFmpeg: cargo build (Unset FFMPEG_DIR to go back to the system pkg-config FFmpeg.) + +NOTE: ffmpeg-sys-next's \`static\` feature BUNDLES these archives into its +rlib at build time, and cargo does not track archive changes — after +rebuilding this FFmpeg you MUST force the re-bundle, or every binary +silently keeps the previous FFmpeg objects: + + cargo clean -p ffmpeg-sys-next EOF