Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Amyspark via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: Amyspark <code@ffmpeg.org>
Subject: [FFmpeg-devel] [PATCH] avfilter/yadif_videotoolbox: Add missing include (PR #21025)
Date: Wed, 26 Nov 2025 16:47:37 -0000
Message-ID: <176417565766.39.806299892393289832@2cb04c0e5124> (raw)

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

                 reply	other threads:[~2025-11-26 16:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=176417565766.39.806299892393289832@2cb04c0e5124 \
    --to=ffmpeg-devel@ffmpeg.org \
    --cc=code@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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