* [FFmpeg-devel] [PATCH] avfilter/yadif_videotoolbox: Add missing include (PR #21025)
@ 2025-11-26 16:47 Amyspark via ffmpeg-devel
0 siblings, 0 replies; only message in thread
From: Amyspark via ffmpeg-devel @ 2025-11-26 16:47 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Amyspark
PR #21025 opened by Amyspark (amyspark)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21025
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21025.patch
Hi all,
This PR is to fix a little hidden corner case regarding VideoToolbox support.
The macro `NULL_IF_CONFIG_SMALL` is declared in libavutil/internal.h, which is not included previously in yadif_videotoolbox.m. This is only revealed when targeting ISO C99 or later (e.g. `-std=c17` as is used in GStreamer's Meson port) under Xcode 26, because it causes a hard build error:
```
../libavfilter/vf_yadif_videotoolbox.m:437:23: error: call to undeclared function 'NULL_IF_CONFIG_SMALL'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
437 | .p.description = NULL_IF_CONFIG_SMALL("YADIF for VideoToolbox frames using Metal compute"),
| ^
../libavfilter/vf_yadif_videotoolbox.m:437:23: error: incompatible integer to pointer conversion initializing 'const char *' with an expression of type 'int' [-Wint-conversion]
437 | .p.description = NULL_IF_CONFIG_SMALL("YADIF for VideoToolbox frames using Metal compute"),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../libavfilter/vf_yadif_videotoolbox.m:437:23: error: initializer element is not a compile-time constant
437 | .p.description = NULL_IF_CONFIG_SMALL("YADIF for VideoToolbox frames using Metal compute"),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
All feedback is appreciated.
>From ba95d2c1f1e441a01ed668ff3c7e4d4709dc2d38 Mon Sep 17 00:00:00 2001
From: "L. E. Segovia" <amy@centricular.com>
Date: Wed, 26 Nov 2025 16:31:54 +0000
Subject: [PATCH] avfilter/yadif_videotoolbox: Add missing include
NULL_IF_CONFIG_SMALL is declared in libavutil/internal.h, which is not
included previously. When targeting ISO C99 or later (e.g. `-std=c17`
as is used in GStreamer's Meson port) under Xcode 26, this causes a
hard build error:
../libavfilter/vf_yadif_videotoolbox.m:437:23: error: call to undeclared function 'NULL_IF_CONFIG_SMALL'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
437 | .p.description = NULL_IF_CONFIG_SMALL("YADIF for VideoToolbox frames using Metal compute"),
| ^
../libavfilter/vf_yadif_videotoolbox.m:437:23: error: incompatible integer to pointer conversion initializing 'const char *' with an expression of type 'int' [-Wint-conversion]
437 | .p.description = NULL_IF_CONFIG_SMALL("YADIF for VideoToolbox frames using Metal compute"),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../libavfilter/vf_yadif_videotoolbox.m:437:23: error: initializer element is not a compile-time constant
437 | .p.description = NULL_IF_CONFIG_SMALL("YADIF for VideoToolbox frames using Metal compute"),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---
libavfilter/vf_yadif_videotoolbox.m | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavfilter/vf_yadif_videotoolbox.m b/libavfilter/vf_yadif_videotoolbox.m
index f8eb0c6bfa..89f0e3b32e 100644
--- a/libavfilter/vf_yadif_videotoolbox.m
+++ b/libavfilter/vf_yadif_videotoolbox.m
@@ -25,6 +25,7 @@
#include "libavutil/avassert.h"
#include "libavutil/hwcontext.h"
#include "libavutil/hwcontext_videotoolbox.h"
+#include "libavutil/internal.h"
#include "libavutil/objc.h"
#include <assert.h>
--
2.49.1
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-11-26 16:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-26 16:47 [FFmpeg-devel] [PATCH] avfilter/yadif_videotoolbox: Add missing include (PR #21025) Amyspark via ffmpeg-devel
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git