PR #23182 opened by VannHarl URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23182 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23182.patch
hwcontext_qsv.o (which defines ff_qsv_get_surface_base_handle) is compiled when CONFIG_QSV=1, not CONFIG_LIBMFX=1. With --disable-everything plus --enable-libvpl, CONFIG_LIBMFX is set (as a libvpl pkg-config side effect) but no QSV component selects qsv, leaving CONFIG_QSV=0. The opencl QSV bridge then referenced an undefined symbol at link time. CONFIG_QSV implies CONFIG_LIBMFX via qsv_deps so this gate is strictly correct. >From f9c71299935bac4a76a03478bf28cb7c78742db4 Mon Sep 17 00:00:00 2001 From: Vann Harl <[email protected]> Date: Thu, 21 May 2026 14:36:40 +0200 Subject: [PATCH] avutil/hwcontext_opencl.c: fix preprocessor check on QSV hwcontext_qsv.o (which defines ff_qsv_get_surface_base_handle) is compiled when CONFIG_QSV=1, not CONFIG_LIBMFX=1. With --disable-everything plus --enable-libvpl, CONFIG_LIBMFX is set (as a libvpl pkg-config side effect) but no QSV component selects qsv, leaving CONFIG_QSV=0. The opencl QSV bridge then referenced an undefined symbol at link time. CONFIG_QSV implies CONFIG_LIBMFX via qsv_deps so this gate is strictly correct. --- libavutil/hwcontext_opencl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/hwcontext_opencl.c b/libavutil/hwcontext_opencl.c index 03f46238b2..9b7e9fbd88 100644 --- a/libavutil/hwcontext_opencl.c +++ b/libavutil/hwcontext_opencl.c @@ -77,7 +77,7 @@ #include <VideoToolbox/VideoToolbox.h> #endif -#if HAVE_OPENCL_VAAPI_INTEL_MEDIA && CONFIG_LIBMFX +#if HAVE_OPENCL_VAAPI_INTEL_MEDIA && CONFIG_QSV extern int ff_qsv_get_surface_base_handle(mfxFrameSurface1 *surf, enum AVHWDeviceType base_dev_typ, void **base_handle); @@ -2278,7 +2278,7 @@ static int opencl_map_from_qsv(AVHWFramesContext *dst_fc, AVFrame *dst, cl_int cle; int err, p; -#if CONFIG_LIBMFX +#if CONFIG_QSV if (src->format == AV_PIX_FMT_QSV) { void *base_handle; mfxFrameSurface1 *mfx_surface = (mfxFrameSurface1*)src->data[3]; -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
