PR #23955 opened by Kacper Michajłow (kasper93)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23955
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23955.patch


From ffc5308df017cbcbad6234d7f8a3c72ff6b19450 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Wed, 29 Jul 2026 21:45:06 +0200
Subject: [PATCH 1/7] avfilter/vsrc_amf: drop WINMMAPI from function pointer
 typedefs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The dllimport attribute is meaningless on a pointer typedef and the
symbols are resolved with dlsym() anyway. Fixes -Wignored-attributes.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 libavfilter/vsrc_amf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/vsrc_amf.c b/libavfilter/vsrc_amf.c
index ec4373b249..2a9811ae4a 100644
--- a/libavfilter/vsrc_amf.c
+++ b/libavfilter/vsrc_amf.c
@@ -76,8 +76,8 @@ AVFILTER_DEFINE_CLASS(amf_capture);
 
 #include <timeapi.h>
 
-typedef WINMMAPI MMRESULT (WINAPI *timeBeginPeriod_fn)( UINT uPeriod);
-typedef WINMMAPI MMRESULT (WINAPI *timeEndPeriod_fn)(UINT uPeriod);
+typedef MMRESULT (WINAPI *timeBeginPeriod_fn)(UINT uPeriod);
+typedef MMRESULT (WINAPI *timeEndPeriod_fn)(UINT uPeriod);
 
 static void amf_increase_timer_precision(AMFGrabContext *ctx)
 {
-- 
2.52.0


From 3ad1ae7496d3646c07347f9bde90786bf27f738f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Wed, 29 Jul 2026 21:50:30 +0200
Subject: [PATCH 2/7] fftools/ffplay: annotate intentional switch fall-throughs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Both fall-throughs are deliberate: SDL_MOUSEBUTTONDOWN shares the cursor
and seek handling of SDL_MOUSEMOTION, and a resize also needs the refresh
done by SDL_WINDOWEVENT_EXPOSED. Silences -Wimplicit-fallthrough.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 fftools/ffplay.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fftools/ffplay.c b/fftools/ffplay.c
index 93eff33b0a..31dca9a7fa 100644
--- a/fftools/ffplay.c
+++ b/fftools/ffplay.c
@@ -30,6 +30,7 @@
 #include <signal.h>
 #include <stdint.h>
 
+#include "libavutil/attributes.h"
 #include "libavutil/avstring.h"
 #include "libavutil/channel_layout.h"
 #include "libavutil/mathematics.h"
@@ -3576,6 +3577,7 @@ static void event_loop(VideoState *cur_stream)
                     last_mouse_left_click = av_gettime_relative();
                 }
             }
+            av_fallthrough;
         case SDL_MOUSEMOTION:
             if (cursor_hidden) {
                 SDL_ShowCursor(1);
@@ -3627,6 +3629,7 @@ static void event_loop(VideoState *cur_stream)
                     }
                     if (vk_renderer)
                         vk_renderer_resize(vk_renderer, screen_width, 
screen_height);
+                    av_fallthrough;
                 case SDL_WINDOWEVENT_EXPOSED:
                     cur_stream->force_refresh = 1;
             }
-- 
2.52.0


From 704ed1f8cc5d48755c36cccea52422594434c794 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Wed, 29 Jul 2026 22:32:55 +0200
Subject: [PATCH 3/7] tools/seek_print: mark usage() as av_noreturn
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

It always calls exit(). Fixes -Wimplicit-fallthrough.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 tools/seek_print.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/seek_print.c b/tools/seek_print.c
index 9280421741..632bd0692f 100644
--- a/tools/seek_print.c
+++ b/tools/seek_print.c
@@ -24,13 +24,14 @@
 #endif
 
 #include "libavformat/avformat.h"
+#include "libavutil/attributes.h"
 #include "libavutil/timestamp.h"
 
 #if !HAVE_GETOPT
 #include "compat/getopt.c"
 #endif
 
-static void usage(int ret)
+av_noreturn static void usage(int ret)
 {
     fprintf(ret ? stderr : stdout,
             "Usage: seek_print file [command ...]\n"
-- 
2.52.0


From bc0c266267475262d6bf5e7cd73f5154febfaa5c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Wed, 29 Jul 2026 23:04:04 +0200
Subject: [PATCH 4/7] avcodec/ac3dec: mark the E-AC-3 prototypes as av_unused
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fixes -Wunused-function in checkheaders.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 libavcodec/ac3dec.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/ac3dec.h b/libavcodec/ac3dec.h
index a099264475..1a4da07fa3 100644
--- a/libavcodec/ac3dec.h
+++ b/libavcodec/ac3dec.h
@@ -266,20 +266,20 @@ struct AC3HeaderInfo;
  * Parse the E-AC-3 frame header.
  * This parses both the bit stream info and audio frame header.
  */
-static int ff_eac3_parse_header(AC3DecodeContext *s, const struct 
AC3HeaderInfo *hdr);
+av_unused static int ff_eac3_parse_header(AC3DecodeContext *s, const struct 
AC3HeaderInfo *hdr);
 
 /**
  * Decode mantissas in a single channel for the entire frame.
  * This is used when AHT mode is enabled.
  */
-static void ff_eac3_decode_transform_coeffs_aht_ch(AC3DecodeContext *s, int 
ch);
+av_unused static void ff_eac3_decode_transform_coeffs_aht_ch(AC3DecodeContext 
*s, int ch);
 
 /**
  * Apply spectral extension to each channel by copying lower frequency
  * coefficients to higher frequency bins and applying side information to
  * approximate the original high frequency signal.
  */
-static void ff_eac3_apply_spectral_extension(AC3DecodeContext *s);
+av_unused static void ff_eac3_apply_spectral_extension(AC3DecodeContext *s);
 
 #if (!USE_FIXED)
 extern float ff_ac3_heavy_dynamic_range_tab[256];
-- 
2.52.0


From 06112968f137330c786a457469e0543b11e7afc3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Wed, 29 Jul 2026 23:17:18 +0200
Subject: [PATCH 5/7] avcodec/lcevcdec: include pixfmt.h for enum AVPixelFormat
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fixes -Wvisibility in checkheaders.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 libavcodec/lcevcdec.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/lcevcdec.h b/libavcodec/lcevcdec.h
index e51d3de989..8571a5e6ac 100644
--- a/libavcodec/lcevcdec.h
+++ b/libavcodec/lcevcdec.h
@@ -22,6 +22,7 @@
 #include "config.h"
 
 #include "libavutil/log.h"
+#include "libavutil/pixfmt.h"
 
 #include <stdint.h>
 #if CONFIG_LIBLCEVC_DEC
-- 
2.52.0


From 101c03ca1eb434aaf676b4f71525b55dc106b7f0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Wed, 29 Jul 2026 23:17:37 +0200
Subject: [PATCH 6/7] avcodec/scpr: mark the shared decode_run helpers as
 av_unused
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fixes -Wunused-function in checkheaders.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 libavcodec/scpr.h | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/libavcodec/scpr.h b/libavcodec/scpr.h
index d161a42c6e..b18cf04add 100644
--- a/libavcodec/scpr.h
+++ b/libavcodec/scpr.h
@@ -72,10 +72,10 @@ typedef struct SCPRContext {
     int           (*decode)(GetByteContext *gb, RangeCoder *rc, uint32_t 
cumFreq, uint32_t freq, uint32_t total_freq);
 } SCPRContext;
 
-static int decode_run_i(AVCodecContext *avctx, uint32_t ptype, int run,
-                        int *px, int *py, uint32_t clr, uint32_t *dst,
-                        int linesize, uint32_t *plx, uint32_t *ply,
-                        uint32_t backstep, int off, int *cx, int *cx1)
+av_unused static int decode_run_i(AVCodecContext *avctx, uint32_t ptype, int 
run,
+                                  int *px, int *py, uint32_t clr, uint32_t 
*dst,
+                                  int linesize, uint32_t *plx, uint32_t *ply,
+                                  uint32_t backstep, int off, int *cx, int 
*cx1)
 {
     uint32_t r, g, b;
     int z;
@@ -214,13 +214,13 @@ static int decode_run_i(AVCodecContext *avctx, uint32_t 
ptype, int run,
     return 0;
 }
 
-static int decode_run_p(AVCodecContext *avctx, uint32_t ptype, int run,
-                        int x, int y, uint32_t clr,
-                        uint32_t *dst, uint32_t *prev,
-                        int linesize, int plinesize,
-                        uint32_t *bx, uint32_t *by,
-                        uint32_t backstep, int sx1, int sx2,
-                        int *cx, int *cx1)
+av_unused static int decode_run_p(AVCodecContext *avctx, uint32_t ptype, int 
run,
+                                  int x, int y, uint32_t clr,
+                                  uint32_t *dst, uint32_t *prev,
+                                  int linesize, int plinesize,
+                                  uint32_t *bx, uint32_t *by,
+                                  uint32_t backstep, int sx1, int sx2,
+                                  int *cx, int *cx1)
 {
     uint32_t r, g, b;
     int z;
-- 
2.52.0


From 934a076991d571e1938186be976dafa1c5c9377f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Wed, 29 Jul 2026 23:22:17 +0200
Subject: [PATCH 7/7] avutil/crc_internal: mark xnmodp as av_unused
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fixes -Wunused-function in checkheaders.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 libavutil/crc_internal.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavutil/crc_internal.h b/libavutil/crc_internal.h
index 8a856990a9..5ab5aa2563 100644
--- a/libavutil/crc_internal.h
+++ b/libavutil/crc_internal.h
@@ -20,6 +20,7 @@
 #define AVUTIL_CRC_INTERNAL_H
 
 #include <stdint.h>
+#include "libavutil/attributes.h"
 #include "libavutil/reverse.h"
 
 static uint64_t reverse(uint64_t p, unsigned int deg)
@@ -35,7 +36,8 @@ static uint64_t reverse(uint64_t p, unsigned int deg)
     return ret;
 }
 
-static uint64_t xnmodp(unsigned n, uint64_t poly, unsigned deg, uint64_t *div, 
int bitreverse)
+av_unused static uint64_t xnmodp(unsigned n, uint64_t poly, unsigned deg,
+                                 uint64_t *div, int bitreverse)
 {
     uint64_t mod, mask, high;
 
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to