Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: mkver via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: mkver <code@ffmpeg.org>
Subject: [FFmpeg-devel] [PATCH] Fix build failure, deprecation warnings due to parser changes (PR #20814)
Date: Sat, 01 Nov 2025 17:52:46 -0000
Message-ID: <176201956706.25.5600013750193456660@2cb04c0e5124> (raw)

PR #20814 opened by mkver
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20814
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20814.patch

I intend to apply this soon.


>From 25968dbb056a1066296a005e2d24545c28a4fa8c Mon Sep 17 00:00:00 2001
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Date: Sat, 1 Nov 2025 18:41:27 +0100
Subject: [PATCH 1/2] avcodec/parser_internal: Rename PASSTHROUGH macro to
 avoid name conflict

wingdi.h defines its own PASSTHROUGH and it is included implicitly
by the VC-1 parser (which is mpegvideo-based and therefore includes
a lot of stuff).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/parser_internal.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/parser_internal.h b/libavcodec/parser_internal.h
index e366b5576a..fa9af971c1 100644
--- a/libavcodec/parser_internal.h
+++ b/libavcodec/parser_internal.h
@@ -67,9 +67,9 @@ static inline const FFCodecParser *ffcodecparser(const AVCodecParser *parser)
 #define CHECK_FOR_TOO_MANY_IDS(...) AV_JOIN(EIGTH_ARG(__VA_ARGS__, NO, NO, NO, NO, NO, NO, NO, NO), _FAIL)
 
 // For compatibility with MSVC's old, spec-incompliant preprocessor.
-#define PASSTHROUGH(...) __VA_ARGS__
+#define FF_MSVC_EXPAND(...) __VA_ARGS__
 #define FIRST_SEVEN2(a,b,c,d,e,f,g,...) a,b,c,d,e,f,g
-#define FIRST_SEVEN(...) PASSTHROUGH(FIRST_SEVEN2(__VA_ARGS__))
+#define FIRST_SEVEN(...) FF_MSVC_EXPAND(FIRST_SEVEN2(__VA_ARGS__))
 #define TIMES_SEVEN(a) a,a,a,a,a,a,a
 
 #if FF_API_PARSER_PRIVATE
-- 
2.49.1


>From fa959bb135bf95edc0f4bcc7ab8c327532f64694 Mon Sep 17 00:00:00 2001
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Date: Sat, 1 Nov 2025 18:48:17 +0100
Subject: [PATCH 2/2] avcodec/parsers: Silence deprecation warnings

Slipped through because Clang (in contrast to GCC) does not warn about
this.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/parsers.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/parsers.c b/libavcodec/parsers.c
index c3460a3b86..cae1f7213e 100644
--- a/libavcodec/parsers.c
+++ b/libavcodec/parsers.c
@@ -22,8 +22,11 @@
 #include "parser_internal.h"
 
 #if FF_API_PARSER_PRIVATE
+#include "libavutil/internal.h"
 #include <assert.h>
 #include <stddef.h>
+
+FF_DISABLE_DEPRECATION_WARNINGS
 #define CHECK_OFFSET(field, public_prefix) static_assert(offsetof(FFCodecParser, field) == offsetof(FFCodecParser, p.public_prefix ## field), "Wrong offsets")
 CHECK_OFFSET(codec_ids,);
 CHECK_OFFSET(priv_data_size,);
@@ -31,6 +34,7 @@ CHECK_OFFSET(init, parser_);
 CHECK_OFFSET(parse, parser_);
 CHECK_OFFSET(close, parser_);
 CHECK_OFFSET(split,);
+FF_ENABLE_DEPRECATION_WARNINGS
 #endif
 
 extern const FFCodecParser ff_aac_parser;
-- 
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-01 17:53 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=176201956706.25.5600013750193456660@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