* [FFmpeg-devel] [PATCH] Avoid av_unused (PR #20866)
@ 2025-11-08 16:17 mkver via ffmpeg-devel
0 siblings, 0 replies; only message in thread
From: mkver via ffmpeg-devel @ 2025-11-08 16:17 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: mkver
PR #20866 opened by mkver
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20866
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20866.patch
>From 41631b48d2392f83130c734b26f7c9fdb8415f5a Mon Sep 17 00:00:00 2001
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Date: Sat, 8 Nov 2025 17:02:13 +0100
Subject: [PATCH 1/2] swresample/swresample: Avoid av_unused
Possible now that -Wdeclaration-after-statement is no longer used.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libswresample/swresample.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index 40485a019c..e7ce4a10aa 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -720,14 +720,13 @@ int attribute_align_arg swr_convert(struct SwrContext *s,
{
AudioData * in= &s->in;
AudioData *out= &s->out;
- av_unused int max_output;
if (!swr_is_initialized(s)) {
av_log(s, AV_LOG_ERROR, "Context has not been initialized\n");
return AVERROR(EINVAL);
}
#if defined(ASSERT_LEVEL) && ASSERT_LEVEL >1
- max_output = swr_get_out_samples(s, in_count);
+ int max_output = swr_get_out_samples(s, in_count);
#endif
while(s->drop_output > 0){
--
2.49.1
>From 6e02e7f5fea48b945ef7abece00d610350b6d079 Mon Sep 17 00:00:00 2001
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Date: Sat, 8 Nov 2025 17:15:57 +0100
Subject: [PATCH 2/2] avformat/mp3enc: Avoid av_unused
Possible now that -Wdeclaration-after-statement is no more.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavformat/mp3enc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c
index 0ebd480d3f..724c7269dc 100644
--- a/libavformat/mp3enc.c
+++ b/libavformat/mp3enc.c
@@ -322,7 +322,6 @@ static int mp3_write_audio_packet(AVFormatContext *s, AVPacket *pkt)
if (pkt->data && pkt->size >= 4) {
MPADecodeHeader mpah;
int ret;
- av_unused int base;
uint32_t h;
h = AV_RB32(pkt->data);
@@ -339,7 +338,7 @@ static int mp3_write_audio_packet(AVFormatContext *s, AVPacket *pkt)
#ifdef FILTER_VBR_HEADERS
/* filter out XING and INFO headers. */
- base = 4 + xing_offtbl[mpah.lsf == 1][mpah.nb_channels == 1];
+ int base = 4 + xing_offtbl[mpah.lsf == 1][mpah.nb_channels == 1];
if (base + 4 <= pkt->size) {
uint32_t v = AV_RB32(pkt->data + base);
--
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-08 16:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-08 16:17 [FFmpeg-devel] [PATCH] Avoid av_unused (PR #20866) mkver 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