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" <[email protected]>
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 -- [email protected]
To unsubscribe send an email to [email protected]