PR #25759 opened by Kilian (lusoris)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25759
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25759.patch

The whisper filter writes its optional output file through AVIO (`avio_open`, 
`avio_write`, `avio_closep` in libavfilter/af_whisper.c), but configure does 
not list libavformat as a dependency of the filter. This adds it in both places 
configure needs it: `whisper_filter_deps` and the conditional `avfilter_deps` 
block.

This follows up the unverified note in the review of pull request 25734, which 
uses the same split for metadata and ametadata.

**What was measured** (x86-64 Linux, whisper.cpp v1.7.6 a8d002cfd879 built as a 
shared CPU-only library, configure line `--disable-everything 
--disable-programs --enable-shared --disable-static --enable-whisper 
--enable-filter=whisper`):

- Before: `avfilter_FFLIBS=avutil`, libavfilter.so has no DT_NEEDED entry for 
libavformat, and linking a small consumer with `-lavfilter -lavutil 
-Wl,--no-allow-shlib-undefined` fails with undefined references to 
`avio_closep`, `avio_write` and `avio_open`.
- Before, with `--disable-avformat` added: configure still enabled the whisper 
filter.
- After: `avfilter_FFLIBS=avformat avcodec avutil`, libavfilter.so needs 
libavformat, and the same consumer links.
- After, with `--disable-avformat`: configure disables the whisper filter.

`make fate-source` passes. No runtime test was run with a whisper model.



>From ffeeb6f67592e98975b5220b5491d4f03b9dcfc6 Mon Sep 17 00:00:00 2001
From: lusoris <[email protected]>
Date: Wed, 4 Nov 2026 01:10:17 +0100
Subject: [PATCH] configure: add the libavformat dependency of whisper

af_whisper writes its output through AVIO. Without avformat in the
filter dependencies and avfilter_deps, a minimal shared build leaves
avio_closep, avio_write and avio_open unresolved. The library builds,
but linking a consumer with -Wl,--no-allow-shlib-undefined fails with
undefined references to all three symbols. With --disable-avformat,
configure also kept the filter enabled; it is now disabled cleanly.

Signed-off-by: lusoris <[email protected]>
---
 configure | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 4f920a4f553..1acc3d5030d 100755
--- a/configure
+++ b/configure
@@ -4305,7 +4305,7 @@ xstack_qsv_filter_deps="libmfx"
 xstack_qsv_filter_select="qsvvpp"
 pad_vaapi_filter_deps="vaapi_1"
 drawbox_vaapi_filter_deps="vaapi_1"
-whisper_filter_deps="whisper"
+whisper_filter_deps="avformat whisper"
 
 # examples
 avio_http_serve_files_deps="avformat avutil fork"
@@ -8260,6 +8260,7 @@ enabled spp_filter          && prepend avfilter_deps 
"avcodec"
 enabled sr_filter           && prepend avfilter_deps "avformat swscale"
 enabled subtitles_filter    && prepend avfilter_deps "avformat avcodec"
 enabled uspp_filter         && prepend avfilter_deps "avcodec"
+enabled whisper_filter      && prepend avfilter_deps "avformat"
 enabled zoompan_filter      && prepend avfilter_deps "swscale"
 
 enabled lavfi_indev         && prepend avdevice_deps "avfilter"
-- 
2.54.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to