From: Marvin Scholz via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: Marvin Scholz <code@ffmpeg.org>
Subject: [FFmpeg-devel] [PR] Add proper fall-through annotations in switch statements (PR #21779)
Date: Tue, 17 Feb 2026 23:49:26 -0000
Message-ID: <177137216661.25.16069620993230191060@29965ddac10e> (raw)
PR #21779 opened by Marvin Scholz (ePirat)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21779
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21779.patch
This adds proper fallthrough attribute annotations in switch statements instead of various flavours of comments. It also adds quite a few missing ones in trivial cases.
>From c9cd45f0fc05149cc5a84fc83d91b93b1f77b006 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Tue, 17 Feb 2026 19:58:23 +0100
Subject: [PATCH 01/89] avutil: add av_fallthrough
---
libavutil/attributes.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavutil/attributes.h b/libavutil/attributes.h
index 9e0222a691..9fdd8bf2f5 100644
--- a/libavutil/attributes.h
+++ b/libavutil/attributes.h
@@ -54,6 +54,12 @@
# define AV_HAS_STD_ATTRIBUTE(x) 0
#endif
+#if AV_HAS_ATTRIBUTE(fallthrough)
+# define av_fallthrough __attribute__((fallthrough))
+#else
+# define av_fallthrough
+#endif
+
#ifndef av_always_inline
#if AV_GCC_VERSION_AT_LEAST(3,1) || defined(__clang__)
# define av_always_inline __attribute__((always_inline)) inline
--
2.52.0
>From 049c62d69955872a17b914b337105620db67d97b Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Tue, 17 Feb 2026 20:36:31 +0100
Subject: [PATCH 02/89] fftools: replace fall-through comments
---
fftools/cmdutils.c | 2 +-
fftools/ffmpeg_filter.c | 2 ++
fftools/textformat/tf_ini.c | 3 ++-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
index 9a365c228d..2c11c81d48 100644
--- a/fftools/cmdutils.c
+++ b/fftools/cmdutils.c
@@ -1267,7 +1267,7 @@ unsigned stream_specifier_match(const StreamSpecifier *ss,
break;
}
}
- // fall-through
+ av_fallthrough;
case STREAM_LIST_GROUP_IDX:
if (ss->stream_list == STREAM_LIST_GROUP_IDX &&
ss->list_id >= 0 && ss->list_id < s->nb_stream_groups)
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index 765b65d0ec..d3b8b3be7d 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -27,6 +27,7 @@
#include "libavfilter/buffersink.h"
#include "libavfilter/buffersrc.h"
+#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/bprint.h"
@@ -2569,6 +2570,7 @@ static void video_sync_process(OutputFilterPriv *ofp, AVFrame *frame,
delta0 = 0;
ofp->next_pts = llrint(sync_ipts);
}
+ av_fallthrough;
case VSYNC_CFR:
// FIXME set to 0.5 after we fix some dts/pts bugs like in avidec.c
if (frame_drop_threshold && delta < frame_drop_threshold && fps->frame_number) {
diff --git a/fftools/textformat/tf_ini.c b/fftools/textformat/tf_ini.c
index 8959785295..d3c69483e4 100644
--- a/fftools/textformat/tf_ini.c
+++ b/fftools/textformat/tf_ini.c
@@ -26,6 +26,7 @@
#include "avtextformat.h"
+#include "libavutil/attributes.h"
#include "libavutil/bprint.h"
#include "libavutil/opt.h"
#include "tf_internal.h"
@@ -74,7 +75,7 @@ static char *ini_escape_str(AVBPrint *dst, const char *src)
case '=':
case ':':
av_bprint_chars(dst, '\\', 1);
- /* fallthrough */
+ av_fallthrough;
default:
if ((unsigned char)c < 32)
av_bprintf(dst, "\\x00%02x", (unsigned char)c);
--
2.52.0
>From 49e9556bdea5e25a885d4a5264c4f8c8965abaed Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Tue, 17 Feb 2026 20:49:43 +0100
Subject: [PATCH 03/89] avcodec: replace fall-through comments
---
libavcodec/av1dec.c | 4 ++--
libavcodec/bsf/dts2pts.c | 3 ++-
libavcodec/cbs_av1.c | 4 ++--
libavcodec/dovi_rpuenc.c | 4 ++--
libavcodec/dpx.c | 3 ++-
libavcodec/dxv.c | 5 +++--
libavcodec/exif.c | 5 +++--
libavcodec/g2meet.c | 3 ++-
libavcodec/h264_parser.c | 2 +-
libavcodec/hevc/hevcdec.c | 2 +-
libavcodec/indeo3.c | 5 +++--
libavcodec/indeo5.c | 3 ++-
libavcodec/leaddec.c | 3 ++-
libavcodec/libsvtav1.c | 3 ++-
libavcodec/mpegvideo_enc.c | 5 +++--
libavcodec/msmpeg4.c | 3 ++-
libavcodec/pngdec.c | 3 ++-
libavcodec/sgidec.c | 3 ++-
libavcodec/sunrastenc.c | 3 ++-
libavcodec/v4l2_buffers.c | 3 ++-
libavcodec/vaapi_mpeg2.c | 3 ++-
libavcodec/vaapi_vc1.c | 5 +++--
libavcodec/vdpau_mpeg4.c | 3 ++-
libavcodec/vdpau_vc1.c | 3 ++-
libavcodec/videotoolbox.c | 3 ++-
libavcodec/vp3.c | 1 +
libavcodec/vp8.c | 5 +++--
libavcodec/vulkan_decode.c | 3 ++-
libavcodec/vulkan_dpx.c | 3 ++-
29 files changed, 61 insertions(+), 37 deletions(-)
diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
index 1dffc7c1b9..16e458b0d6 100644
--- a/libavcodec/av1dec.c
+++ b/libavcodec/av1dec.c
@@ -1332,7 +1332,7 @@ static int av1_receive_frame_internal(AVCodecContext *avctx, AVFrame *frame)
case AV1_OBU_REDUNDANT_FRAME_HEADER:
if (s->raw_frame_header)
break;
- // fall-through
+ av_fallthrough;
case AV1_OBU_FRAME:
case AV1_OBU_FRAME_HEADER:
if (!s->raw_seq) {
@@ -1388,7 +1388,7 @@ static int av1_receive_frame_internal(AVCodecContext *avctx, AVFrame *frame)
}
if (unit->type != AV1_OBU_FRAME)
break;
- // fall-through
+ av_fallthrough;
case AV1_OBU_TILE_GROUP:
if (!s->raw_frame_header) {
av_log(avctx, AV_LOG_ERROR, "Missing Frame Header.\n");
diff --git a/libavcodec/bsf/dts2pts.c b/libavcodec/bsf/dts2pts.c
index 122661a5df..ff03508c18 100644
--- a/libavcodec/bsf/dts2pts.c
+++ b/libavcodec/bsf/dts2pts.c
@@ -25,6 +25,7 @@
#include <stdbool.h>
+#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "libavutil/fifo.h"
#include "libavutil/mem.h"
@@ -262,7 +263,7 @@ static int h264_filter(AVBSFContext *ctx)
h264->poc.prev_frame_num_offset = 0;
h264->poc.prev_poc_msb =
h264->poc.prev_poc_lsb = 0;
- // fall-through
+ av_fallthrough;
case H264_NAL_SLICE: {
const H264RawSlice *slice = unit->content;
const H264RawSliceHeader *header = &slice->header;
diff --git a/libavcodec/cbs_av1.c b/libavcodec/cbs_av1.c
index d05352c738..deb73c8ebb 100644
--- a/libavcodec/cbs_av1.c
+++ b/libavcodec/cbs_av1.c
@@ -938,7 +938,7 @@ static int cbs_av1_read_unit(CodedBitstreamContext *ctx,
unit->data_ref);
if (err < 0)
return err;
- // fall-through
+ av_fallthrough;
case AV1_OBU_TILE_GROUP:
{
AV1RawTileGroup *tile_group = obu->header.obu_type == AV1_OBU_FRAME ? &obu->obu.frame.tile_group
@@ -1116,7 +1116,7 @@ static int cbs_av1_write_obu(CodedBitstreamContext *ctx,
err = cbs_av1_write_frame_obu(ctx, pbc, &obu->obu.frame, NULL);
if (err < 0)
goto error;
- // fall-through
+ av_fallthrough;
case AV1_OBU_TILE_GROUP:
{
AV1RawTileGroup *tile_group = obu->header.obu_type == AV1_OBU_FRAME ? &obu->obu.frame.tile_group
diff --git a/libavcodec/dovi_rpuenc.c b/libavcodec/dovi_rpuenc.c
index 0c22bf34ed..dc63c68405 100644
--- a/libavcodec/dovi_rpuenc.c
+++ b/libavcodec/dovi_rpuenc.c
@@ -136,7 +136,7 @@ static av_cold int dovi_configure_ext(DOVIContext *s, enum AVCodecID codec_id,
bl_compat_id = 0;
break;
}
- /* fall through */
+ av_fallthrough;
case 8: /* HEVC (or AV1) with BL compatibility */
if (color_space == AVCOL_SPC_BT2020_NCL &&
color_primaries == AVCOL_PRI_BT2020 &&
@@ -612,7 +612,7 @@ int ff_dovi_rpu_generate(DOVIContext *s, const AVDOVIMetadata *metadata,
/* Limited metadata compression requires vdr_rpi_id == 0 */
if (vdr_rpu_id != 0)
break;
- /* fall through */
+ av_fallthrough;
case AV_DOVI_COMPRESSION_EXTENDED:
if (s->vdr[vdr_rpu_id])
use_prev_vdr_rpu = !memcmp(s->vdr[vdr_rpu_id], mapping, sizeof(*mapping));
diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c
index 52a03501ec..6e7c01fd65 100644
--- a/libavcodec/dpx.c
+++ b/libavcodec/dpx.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/avstring.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/intfloat.h"
@@ -237,7 +238,7 @@ static void unpack_frame(AVCodecContext *avctx, AVFrame *p, const uint8_t *buf,
break;
case 16:
elements *= 2;
- // fall-through
+ av_fallthrough;
case 8:
if ( avctx->pix_fmt == AV_PIX_FMT_YUVA444P
|| avctx->pix_fmt == AV_PIX_FMT_YUV444P) {
diff --git a/libavcodec/dxv.c b/libavcodec/dxv.c
index 626dd75a33..344c7b2f3c 100644
--- a/libavcodec/dxv.c
+++ b/libavcodec/dxv.c
@@ -22,6 +22,7 @@
#include <stdint.h>
+#include "libavutil/attributes.h"
#include "libavutil/imgutils.h"
#include "libavutil/mem.h"
@@ -1041,7 +1042,7 @@ static int dxv_decode(AVCodecContext *avctx, AVFrame *frame,
ret = ff_texturedsp_exec_decompress_threads(avctx, &texdsp_ctx);
if (ret < 0)
return ret;
- /* fallthrough */
+ av_fallthrough;
case DXV_FMT_YCG6:
/* BC5 texture with Co in the first half of each block and Cg in the second */
ctexdsp_ctx.tex_data.in = ctx->ctex_data;
@@ -1056,7 +1057,7 @@ static int dxv_decode(AVCodecContext *avctx, AVFrame *frame,
ret = ff_texturedsp_exec_decompress_threads(avctx, &ctexdsp_ctx);
if (ret < 0)
return ret;
- /* fallthrough */
+ av_fallthrough;
case DXV_FMT_DXT1:
case DXV_FMT_DXT5:
/* For DXT1 and DXT5, self explanatory
diff --git a/libavcodec/exif.c b/libavcodec/exif.c
index e422b28b8d..6b29ce4cbd 100644
--- a/libavcodec/exif.c
+++ b/libavcodec/exif.c
@@ -29,6 +29,7 @@
#include <inttypes.h>
+#include "libavutil/attributes.h"
#include "libavutil/avconfig.h"
#include "libavutil/bprint.h"
#include "libavutil/display.h"
@@ -891,13 +892,13 @@ int av_exif_parse_buffer(void *logctx, const uint8_t *buf, size_t size,
if (size < 6)
return AVERROR_INVALIDDATA;
off = 6;
- /* fallthrough */
+ av_fallthrough;
case AV_EXIF_T_OFF:
if (size < 4)
return AVERROR_INVALIDDATA;
if (!off)
off = AV_RB32(buf) + 4;
- /* fallthrough */
+ av_fallthrough;
case AV_EXIF_TIFF_HEADER: {
int ifd_offset;
if (size <= off)
diff --git a/libavcodec/g2meet.c b/libavcodec/g2meet.c
index a4900641e7..eb6aaf3072 100644
--- a/libavcodec/g2meet.c
+++ b/libavcodec/g2meet.c
@@ -28,6 +28,7 @@
#include <inttypes.h>
#include <zlib.h>
+#include "libavutil/attributes.h"
#include "libavutil/imgutils.h"
#include "libavutil/mem.h"
#include "libavutil/mem_internal.h"
@@ -661,7 +662,7 @@ static int epic_decode_run_length(ePICContext *dc, int x, int y, int tile_width,
break;
}
}
- /* fall through */
+ av_fallthrough;
default:
NWneW = 1;
old_WWneW = WWneW;
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
index 040739a1d4..49080a219a 100644
--- a/libavcodec/h264_parser.c
+++ b/libavcodec/h264_parser.c
@@ -355,7 +355,7 @@ static inline int parse_nal_units(AVCodecParserContext *s,
p->poc.prev_frame_num_offset = 0;
p->poc.prev_poc_msb =
p->poc.prev_poc_lsb = 0;
- /* fall through */
+ av_fallthrough;
case H264_NAL_SLICE:
get_ue_golomb_long(&nal.gb); // skip first_mb_in_slice
slice_type = get_ue_golomb_31(&nal.gb);
diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c
index ae5f0fe69d..8611909dd3 100644
--- a/libavcodec/hevc/hevcdec.c
+++ b/libavcodec/hevc/hevcdec.c
@@ -683,7 +683,7 @@ static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps)
#if CONFIG_HEVC_VIDEOTOOLBOX_HWACCEL
*fmt++ = AV_PIX_FMT_VIDEOTOOLBOX;
#endif
- /* NOTE: fallthrough */
+ av_fallthrough;
case AV_PIX_FMT_YUV420P12:
case AV_PIX_FMT_YUV444P12:
#if CONFIG_HEVC_VAAPI_HWACCEL
diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index ae6fd7290e..fb9f3fba3b 100644
--- a/libavcodec/indeo3.c
+++ b/libavcodec/indeo3.c
@@ -29,6 +29,7 @@
* @see http://wiki.multimedia.cx/index.php?title=Indeo_3
*/
+#include "libavutil/attributes.h"
#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
@@ -500,7 +501,7 @@ static int decode_cell_data(Indeo3DecodeContext *ctx, Cell *cell,
skip_flag = 0;
rle_blocks = 1;
code = 253;
- /* FALLTHROUGH */
+ av_fallthrough;
case RLE_ESC_FF:
case RLE_ESC_FE:
case RLE_ESC_FD:
@@ -532,7 +533,7 @@ static int decode_cell_data(Indeo3DecodeContext *ctx, Cell *cell,
case RLE_ESC_F9:
skip_flag = 1;
rle_blocks = 1;
- /* FALLTHROUGH */
+ av_fallthrough;
case RLE_ESC_FA:
if (line)
return IV3_BAD_RLE;
diff --git a/libavcodec/indeo5.c b/libavcodec/indeo5.c
index df95064e3f..594b97bd46 100644
--- a/libavcodec/indeo5.c
+++ b/libavcodec/indeo5.c
@@ -27,6 +27,7 @@
* Known FOURCCs: 'IV50'
*/
+#include "libavutil/attributes.h"
#define BITSTREAM_READER_LE
#include "avcodec.h"
#include "codec_internal.h"
@@ -615,7 +616,7 @@ static void switch_buffers(IVI45DecContext *ctx)
switch (ctx->frame_type) {
case FRAMETYPE_INTRA:
ctx->buf_switch = 0;
- /* FALLTHROUGH */
+ av_fallthrough;
case FRAMETYPE_INTER:
ctx->inter_scal = 0;
ctx->dst_buf = ctx->buf_switch;
diff --git a/libavcodec/leaddec.c b/libavcodec/leaddec.c
index e6a91faabc..fbd81aaa3c 100644
--- a/libavcodec/leaddec.c
+++ b/libavcodec/leaddec.c
@@ -30,6 +30,7 @@
#include "jpegquanttables.h"
#include "jpegtables.h"
#include "leaddata.h"
+#include "libavutil/attributes.h"
#include "libavutil/mem.h"
#include "libavutil/mem_internal.h"
#include "libavutil/thread.h"
@@ -160,7 +161,7 @@ static int lead_decode_frame(AVCodecContext *avctx, AVFrame * frame,
case 0x6:
case 0x8000:
yuv20p_half = 1;
- // fall-through
+ av_fallthrough;
case 0x1000:
avctx->pix_fmt = AV_PIX_FMT_YUV420P;
break;
diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
index 90c61b98a1..24ab976280 100644
--- a/libavcodec/libsvtav1.c
+++ b/libavcodec/libsvtav1.c
@@ -25,6 +25,7 @@
#include <EbSvtAv1Enc.h>
#include <EbSvtAv1Metadata.h>
+#include "libavutil/attributes.h"
#include "libavutil/common.h"
#include "libavutil/frame.h"
#include "libavutil/imgutils.h"
@@ -644,7 +645,7 @@ static int eb_receive_packet(AVCodecContext *avctx, AVPacket *pkt)
switch (headerPtr->pic_type) {
case EB_AV1_KEY_PICTURE:
pkt->flags |= AV_PKT_FLAG_KEY;
- // fall-through
+ av_fallthrough;
case EB_AV1_INTRA_ONLY_PICTURE:
pict_type = AV_PICTURE_TYPE_I;
break;
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 46c8863a14..11fc84dad7 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -36,6 +36,7 @@
#include <assert.h>
#include <stdint.h>
+#include "libavutil/attributes.h"
#include "libavutil/emms.h"
#include "libavutil/internal.h"
#include "libavutil/intmath.h"
@@ -869,7 +870,7 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
#if CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER
case AV_CODEC_ID_MPEG2VIDEO:
s->rtp_mode = 1;
- /* fallthrough */
+ av_fallthrough;
case AV_CODEC_ID_MPEG1VIDEO:
s->c.out_format = FMT_MPEG1;
s->c.low_delay = !!(avctx->flags & AV_CODEC_FLAG_LOW_DELAY);
@@ -3147,7 +3148,7 @@ static int encode_thread(AVCodecContext *c, void *arg){
case AV_CODEC_ID_H263P:
if (s->c.dc_val)
ff_h263_mpeg4_reset_dc(s);
- // fallthrough
+ av_fallthrough;
#endif
case AV_CODEC_ID_H263:
if (CONFIG_H263_ENCODER) {
diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c
index fed255989e..b0565bfe24 100644
--- a/libavcodec/msmpeg4.c
+++ b/libavcodec/msmpeg4.c
@@ -30,6 +30,7 @@
#include "config.h"
#include "config_components.h"
+#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "libavutil/thread.h"
#if ARCH_X86
@@ -143,7 +144,7 @@ av_cold void ff_msmpeg4_common_init(MPVContext *const s,
#if CONFIG_WMV2_DECODER || CONFIG_WMV2_ENCODER
case MSMP4_WMV2:
ff_wmv2dsp_init(&s->idsp);
- // fallthrough
+ av_fallthrough;
#endif
case MSMP4_WMV1:
s->y_dc_scale_table= ff_wmv1_y_dc_scale_table;
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index 042b6a5c2f..60cb013879 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -23,6 +23,7 @@
#include "config_components.h"
+#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "libavutil/bprint.h"
#include "libavutil/crc.h"
@@ -1583,7 +1584,7 @@ static int decode_frame_common(AVCodecContext *avctx, PNGDecContext *s,
goto fail;
}
bytestream2_get_be32(&gb_chunk);
- /* fallthrough */
+ av_fallthrough;
case MKTAG('I', 'D', 'A', 'T'):
if (CONFIG_APNG_DECODER && avctx->codec_id == AV_CODEC_ID_APNG && !decode_next_dat)
continue;
diff --git a/libavcodec/sgidec.c b/libavcodec/sgidec.c
index 40186dcdb7..63aed47b97 100644
--- a/libavcodec/sgidec.c
+++ b/libavcodec/sgidec.c
@@ -23,6 +23,7 @@
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"
+#include "libavutil/attributes.h"
#include "sgi.h"
/**
@@ -241,7 +242,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p,
break;
case SGI_RGBA:
MAP(3, 3);
- /* fallthrough */
+ av_fallthrough;
case SGI_RGB:
MAP(0, 2);
MAP(1, 0);
diff --git a/libavcodec/sunrastenc.c b/libavcodec/sunrastenc.c
index 9922dbd061..233c628e10 100644
--- a/libavcodec/sunrastenc.c
+++ b/libavcodec/sunrastenc.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/opt.h"
#include "avcodec.h"
@@ -154,7 +155,7 @@ static av_cold int sunrast_encode_init(AVCodecContext *avctx)
case AV_PIX_FMT_PAL8 :
s->maptype = RMT_EQUAL_RGB;
s->maplength = 3 * 256;
- /* fall-through */
+ av_fallthrough;
case AV_PIX_FMT_GRAY8:
s->depth = 8;
break;
diff --git a/libavcodec/v4l2_buffers.c b/libavcodec/v4l2_buffers.c
index 077c1ee944..f96c26771b 100644
--- a/libavcodec/v4l2_buffers.c
+++ b/libavcodec/v4l2_buffers.c
@@ -28,6 +28,7 @@
#include <fcntl.h>
#include <poll.h>
#include "libavcodec/avcodec.h"
+#include "libavutil/attributes.h"
#include "libavutil/pixdesc.h"
#include "libavutil/refstruct.h"
#include "v4l2_context.h"
@@ -226,7 +227,7 @@ static void v4l2_get_interlacing(AVFrame *frame, V4L2Buffer *buf)
case V4L2_FIELD_INTERLACED:
case V4L2_FIELD_INTERLACED_TB:
frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST;
- /* fallthrough */
+ av_fallthrough;
case V4L2_FIELD_INTERLACED_BT:
frame->flags |= AV_FRAME_FLAG_INTERLACED;
break;
diff --git a/libavcodec/vaapi_mpeg2.c b/libavcodec/vaapi_mpeg2.c
index 925f0db1ba..07bf35c532 100644
--- a/libavcodec/vaapi_mpeg2.c
+++ b/libavcodec/vaapi_mpeg2.c
@@ -21,6 +21,7 @@
*/
#include "hwaccel_internal.h"
+#include "libavutil/attributes.h"
#include "mpegutils.h"
#include "mpegvideo.h"
#include "mpegvideodec.h"
@@ -77,7 +78,7 @@ static int vaapi_mpeg2_start_frame(AVCodecContext *avctx,
switch (s->pict_type) {
case AV_PICTURE_TYPE_B:
pic_param.backward_reference_picture = ff_vaapi_get_surface_id(s->next_pic.ptr->f);
- // fall-through
+ av_fallthrough;
case AV_PICTURE_TYPE_P:
pic_param.forward_reference_picture = ff_vaapi_get_surface_id(s->last_pic.ptr->f);
break;
diff --git a/libavcodec/vaapi_vc1.c b/libavcodec/vaapi_vc1.c
index a3dd3140e2..42171918e8 100644
--- a/libavcodec/vaapi_vc1.c
+++ b/libavcodec/vaapi_vc1.c
@@ -22,6 +22,7 @@
#include "config_components.h"
+#include "libavutil/attributes.h"
#include "libavutil/mem.h"
#include "hwaccel_internal.h"
#include "mpegvideodec.h"
@@ -379,7 +380,7 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx,
case AV_PICTURE_TYPE_B:
if (s->next_pic.ptr)
pic_param.backward_reference_picture = ff_vaapi_get_surface_id(s->next_pic.ptr->f);
- // fall-through
+ av_fallthrough;
case AV_PICTURE_TYPE_P:
if (s->last_pic.ptr)
pic_param.forward_reference_picture = ff_vaapi_get_surface_id(s->last_pic.ptr->f);
@@ -417,7 +418,7 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx,
ff_bp[2] = pic_param.bitplane_present.flags.bp_forward_mb ? v->forward_mb_plane : NULL;
break;
}
- /* fall-through (BI-type) */
+ av_fallthrough; // (BI-type)
case AV_PICTURE_TYPE_I:
ff_bp[0] = pic_param.bitplane_present.flags.bp_field_tx ? v->fieldtx_plane : NULL;
ff_bp[1] = pic_param.bitplane_present.flags.bp_ac_pred ? v->acpred_plane : NULL;
diff --git a/libavcodec/vdpau_mpeg4.c b/libavcodec/vdpau_mpeg4.c
index 668720a231..58c8a6d769 100644
--- a/libavcodec/vdpau_mpeg4.c
+++ b/libavcodec/vdpau_mpeg4.c
@@ -25,6 +25,7 @@
#include "avcodec.h"
#include "hwaccel_internal.h"
+#include "libavutil/attributes.h"
#include "mpeg4videodec.h"
#include "vdpau.h"
#include "vdpau_internal.h"
@@ -52,7 +53,7 @@ static int vdpau_mpeg4_start_frame(AVCodecContext *avctx,
assert(ref != VDP_INVALID_HANDLE);
info->backward_reference = ref;
info->vop_coding_type = 2;
- /* fall-through */
+ av_fallthrough;
case AV_PICTURE_TYPE_P:
ref = ff_vdpau_get_surface_id(s->last_pic.ptr->f);
assert(ref != VDP_INVALID_HANDLE);
diff --git a/libavcodec/vdpau_vc1.c b/libavcodec/vdpau_vc1.c
index a5fd8156f4..323ac4127a 100644
--- a/libavcodec/vdpau_vc1.c
+++ b/libavcodec/vdpau_vc1.c
@@ -27,6 +27,7 @@
#include "avcodec.h"
#include "hwaccel_internal.h"
+#include "libavutil/attributes.h"
#include "vc1.h"
#include "vdpau.h"
#include "vdpau_internal.h"
@@ -53,7 +54,7 @@ static int vdpau_vc1_start_frame(AVCodecContext *avctx,
assert(ref != VDP_INVALID_HANDLE);
info->backward_reference = ref;
}
- /* fall-through */
+ av_fallthrough;
case AV_PICTURE_TYPE_P:
if (s->last_pic.ptr) {
ref = ff_vdpau_get_surface_id(s->last_pic.ptr->f);
diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c
index 2cd22cba1a..0a9d53c7dd 100644
--- a/libavcodec/videotoolbox.c
+++ b/libavcodec/videotoolbox.c
@@ -23,6 +23,7 @@
#include "config.h"
#include "config_components.h"
#include "videotoolbox.h"
+#include "libavutil/attributes.h"
#include "libavutil/hwcontext_videotoolbox.h"
#include "libavutil/mem.h"
#include "vt_internal.h"
@@ -935,7 +936,7 @@ static int videotoolbox_start(AVCodecContext *avctx)
switch (avctx->codec_tag) {
default:
av_log(avctx, AV_LOG_WARNING, "Unknown prores profile %d\n", avctx->codec_tag);
- // fall-through
+ av_fallthrough;
case MKTAG('a','p','c','o'): // kCMVideoCodecType_AppleProRes422Proxy
case MKTAG('a','p','c','s'): // kCMVideoCodecType_AppleProRes422LT
case MKTAG('a','p','c','n'): // kCMVideoCodecType_AppleProRes422
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 7ce54967e1..1662aea6f3 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -944,6 +944,7 @@ static int unpack_vectors(Vp3DecodeContext *s, GetBitContext *gb)
last_gold_motion_y = motion_y[0] = vp4_get_mv(gb, 1, last_gold_motion_y);
break;
} /* otherwise fall through */
+ av_fallthrough;
case MODE_INTER_PLUS_MV:
/* all 6 fragments use the same motion vector */
if (coding_mode == 0) {
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index 9010e19e6b..c54e79173c 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -26,6 +26,7 @@
#include "config_components.h"
+#include "libavutil/attributes.h"
#include "libavutil/mem.h"
#include "libavutil/mem_internal.h"
@@ -1660,7 +1661,7 @@ int check_intra_pred4x4_mode_emuedge(int mode, int mb_x, int mb_y,
*copy_buf = 1;
return mode;
}
- /* fall-through */
+ av_fallthrough;
case DIAG_DOWN_LEFT_PRED:
case VERT_LEFT_PRED:
return !mb_y ? (vp7 ? DC_128_PRED : DC_127_PRED) : mode;
@@ -1669,7 +1670,7 @@ int check_intra_pred4x4_mode_emuedge(int mode, int mb_x, int mb_y,
*copy_buf = 1;
return mode;
}
- /* fall-through */
+ av_fallthrough;
case HOR_UP_PRED:
return !mb_x ? (vp7 ? DC_128_PRED : DC_129_PRED) : mode;
case TM_VP8_PRED:
diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vulkan_decode.c
index 9ab8d45aa9..8fe0428dbe 100644
--- a/libavcodec/vulkan_decode.c
+++ b/libavcodec/vulkan_decode.c
@@ -16,6 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/refstruct.h"
#include "vulkan_video.h"
#include "vulkan_decode.h"
@@ -1203,7 +1204,7 @@ int ff_vk_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
case AV_PIX_FMT_YUVA422P12:
case AV_PIX_FMT_YUVA444P12:
hwfc->format[3] = VK_FORMAT_R16_UNORM;
- /* fallthrough */
+ av_fallthrough;
case AV_PIX_FMT_YUV422P10:
case AV_PIX_FMT_YUV444P10:
case AV_PIX_FMT_YUV422P12:
diff --git a/libavcodec/vulkan_dpx.c b/libavcodec/vulkan_dpx.c
index 17f91c6ce4..e644885a28 100644
--- a/libavcodec/vulkan_dpx.c
+++ b/libavcodec/vulkan_dpx.c
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "vulkan_decode.h"
#include "hwaccel_internal.h"
@@ -305,7 +306,7 @@ static int vk_decode_dpx_init(AVCodecContext *avctx)
case AV_PIX_FMT_GBRP10:
if (dpx->unpadded_10bit)
return AVERROR(ENOTSUP);
- /* fallthrough */
+ av_fallthrough;
default:
break;
}
--
2.52.0
>From 69d0f153df8fb687df8c3cae06bb359bc2f21c8f Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Tue, 17 Feb 2026 21:03:27 +0100
Subject: [PATCH 04/89] avfilter: replace fall-through comments
---
libavfilter/formats.c | 3 ++-
libavfilter/vf_colorspace.c | 3 ++-
libavfilter/vf_colorspace_cuda.c | 3 ++-
libavfilter/vf_drawvg.c | 9 +++++----
libavfilter/vf_lut.c | 18 +++++++++---------
libavfilter/vsrc_testsrc.c | 13 +++++++------
6 files changed, 27 insertions(+), 22 deletions(-)
diff --git a/libavfilter/formats.c b/libavfilter/formats.c
index 3315922cc7..fac2e4a393 100644
--- a/libavfilter/formats.c
+++ b/libavfilter/formats.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "libavutil/bprint.h"
#include "libavutil/channel_layout.h"
@@ -1193,7 +1194,7 @@ int ff_default_query_formats(AVFilterContext *ctx)
break;
default:
av_assert2(!"Unreachable");
- /* Intended fallthrough */
+ av_fallthrough;
case FF_FILTER_FORMATS_PASSTHROUGH:
case FF_FILTER_FORMATS_QUERY_FUNC:
case FF_FILTER_FORMATS_QUERY_FUNC2:
diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c
index de9a1a42e4..3228e22e76 100644
--- a/libavfilter/vf_colorspace.c
+++ b/libavfilter/vf_colorspace.c
@@ -23,6 +23,7 @@
* Convert between colorspaces.
*/
+#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "libavutil/csp.h"
#include "libavutil/frame.h"
@@ -391,7 +392,7 @@ static int get_range_off(AVFilterContext *ctx, int *off,
s->did_warn_range = 1;
}
}
- // fall-through
+ av_fallthrough;
case AVCOL_RANGE_MPEG:
*off = 16 << (depth - 8);
*y_rng = 219 << (depth - 8);
diff --git a/libavfilter/vf_colorspace_cuda.c b/libavfilter/vf_colorspace_cuda.c
index 54d6228cd1..45c05fbea9 100644
--- a/libavfilter/vf_colorspace_cuda.c
+++ b/libavfilter/vf_colorspace_cuda.c
@@ -22,6 +22,7 @@
#include <string.h>
+#include "libavutil/attributes.h"
#include "libavutil/common.h"
#include "libavutil/cuda_check.h"
#include "libavutil/hwcontext.h"
@@ -282,7 +283,7 @@ static int conv_cuda_convert(AVFilterContext* ctx, AVFrame* out, AVFrame* in)
break;
case AV_PIX_FMT_YUV420P:
width = comp_id ? in->width / 2 : in->width;
- /* fall-through */
+ av_fallthrough;
case AV_PIX_FMT_NV12:
height = comp_id ? in->height / 2 : in->height;
break;
diff --git a/libavfilter/vf_drawvg.c b/libavfilter/vf_drawvg.c
index 15b1e4899b..461b71251b 100644
--- a/libavfilter/vf_drawvg.c
+++ b/libavfilter/vf_drawvg.c
@@ -28,6 +28,7 @@
#include <cairo.h>
#include <stdbool.h>
+#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/bswap.h"
@@ -633,7 +634,7 @@ next_token:
goto next_token;
}
- /* fallthrough */
+ av_fallthrough;
default:
token->type = TOKEN_WORD;
@@ -859,7 +860,7 @@ static int vgs_parse_numeric_argument(
if (ret == 0)
break;
- /* fallthrough */
+ av_fallthrough;
default:
vgs_log_invalid_token(log_ctx, parser, &token, "Expected numeric argument.");
@@ -1101,7 +1102,7 @@ static int vgs_parse_statement(
FAIL(EINVAL);
}
- /* fallthrough */
+ av_fallthrough;
case PARAM_NUMERIC:
case PARAM_NUMERIC_COLOR:
@@ -1217,7 +1218,7 @@ static int vgs_parse_statement(
continue;
}
- /* fallthrough */
+ av_fallthrough;
case PARAM_VAR_NAME: {
int var_idx = -1;
diff --git a/libavfilter/vf_lut.c b/libavfilter/vf_lut.c
index 14c9964751..ac0636dc52 100644
--- a/libavfilter/vf_lut.c
+++ b/libavfilter/vf_lut.c
@@ -379,14 +379,14 @@ static int lut_packed_16bits(AVFilterContext *ctx, void *arg, int jobnr, int nb_
switch (step) {
#if HAVE_BIGENDIAN
- case 4: outrow[3] = av_bswap16(tab[3][av_bswap16(inrow[3])]); // Fall-through
- case 3: outrow[2] = av_bswap16(tab[2][av_bswap16(inrow[2])]); // Fall-through
- case 2: outrow[1] = av_bswap16(tab[1][av_bswap16(inrow[1])]); // Fall-through
+ case 4: outrow[3] = av_bswap16(tab[3][av_bswap16(inrow[3])]); av_fallthrough;
+ case 3: outrow[2] = av_bswap16(tab[2][av_bswap16(inrow[2])]); av_fallthrough;
+ case 2: outrow[1] = av_bswap16(tab[1][av_bswap16(inrow[1])]); av_fallthrough;
default: outrow[0] = av_bswap16(tab[0][av_bswap16(inrow[0])]);
#else
- case 4: outrow[3] = tab[3][inrow[3]]; // Fall-through
- case 3: outrow[2] = tab[2][inrow[2]]; // Fall-through
- case 2: outrow[1] = tab[1][inrow[1]]; // Fall-through
+ case 4: outrow[3] = tab[3][inrow[3]]; av_fallthrough;
+ case 3: outrow[2] = tab[2][inrow[2]]; av_fallthrough;
+ case 2: outrow[1] = tab[1][inrow[1]]; av_fallthrough;
default: outrow[0] = tab[0][inrow[0]];
#endif
}
@@ -414,9 +414,9 @@ static int lut_packed_8bits(AVFilterContext *ctx, void *arg, int jobnr, int nb_j
outrow = outrow0 + i * out_linesize;
for (j = 0; j < w; j++) {
switch (step) {
- case 4: outrow[3] = tab[3][inrow[3]]; // Fall-through
- case 3: outrow[2] = tab[2][inrow[2]]; // Fall-through
- case 2: outrow[1] = tab[1][inrow[1]]; // Fall-through
+ case 4: outrow[3] = tab[3][inrow[3]]; av_fallthrough;
+ case 3: outrow[2] = tab[2][inrow[2]]; av_fallthrough;
+ case 2: outrow[1] = tab[1][inrow[1]]; av_fallthrough;
default: outrow[0] = tab[0][inrow[0]];
}
outrow += step;
diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c
index bfc3491596..697b94d4e8 100644
--- a/libavfilter/vsrc_testsrc.c
+++ b/libavfilter/vsrc_testsrc.c
@@ -35,6 +35,7 @@
#include "config_components.h"
+#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "libavutil/common.h"
#include "libavutil/ffmath.h"
@@ -1048,7 +1049,7 @@ static void rgbtest_put_pixel(uint8_t *dstp[4], int dst_linesizep[4],
case AV_PIX_FMT_GBRAP:
p = dstp[3] + x + y * dst_linesizep[3];
p[0] = a;
- // fall-through
+ av_fallthrough;
case AV_PIX_FMT_GBRP:
p = dstp[0] + x + y * dst_linesize;
p[0] = g;
@@ -1063,7 +1064,7 @@ static void rgbtest_put_pixel(uint8_t *dstp[4], int dst_linesizep[4],
case AV_PIX_FMT_GBRAP16:
p16 = (uint16_t *)(dstp[3] + x*2 + y * dst_linesizep[3]);
p16[0] = a;
- // fall-through
+ av_fallthrough;
case AV_PIX_FMT_GBRP9:
case AV_PIX_FMT_GBRP10:
case AV_PIX_FMT_GBRP12:
@@ -1214,7 +1215,7 @@ static void yuvtest_put_pixel(uint8_t *dstp[4], int dst_linesizep[4],
case AV_PIX_FMT_XV36:
case AV_PIX_FMT_XV48:
a = UINT16_MAX;
- // fall-through
+ av_fallthrough;
case AV_PIX_FMT_AYUV64:
AV_WN16A(&dstp[0][i*8 + ayuv_map[Y]*2 + j*dst_linesizep[0]], y << desc->comp[0].shift);
AV_WN16A(&dstp[0][i*8 + ayuv_map[U]*2 + j*dst_linesizep[0]], u << desc->comp[1].shift);
@@ -1223,7 +1224,7 @@ static void yuvtest_put_pixel(uint8_t *dstp[4], int dst_linesizep[4],
break;
case AV_PIX_FMT_VUYX:
a = UINT8_MAX;
- // fall-through
+ av_fallthrough;
case AV_PIX_FMT_UYVA:
case AV_PIX_FMT_VUYA:
case AV_PIX_FMT_AYUV:
@@ -1232,7 +1233,7 @@ static void yuvtest_put_pixel(uint8_t *dstp[4], int dst_linesizep[4],
break;
case AV_PIX_FMT_YUVA444P:
dstp[3][i + j*dst_linesizep[3]] = a;
- // fall-through
+ av_fallthrough;
case AV_PIX_FMT_YUV444P:
case AV_PIX_FMT_YUVJ444P:
dstp[0][i + j*dst_linesizep[0]] = y;
@@ -1244,7 +1245,7 @@ static void yuvtest_put_pixel(uint8_t *dstp[4], int dst_linesizep[4],
case AV_PIX_FMT_YUVA444P12:
case AV_PIX_FMT_YUVA444P16:
AV_WN16A(&dstp[3][i*2 + j*dst_linesizep[3]], a);
- // fall-through
+ av_fallthrough;
case AV_PIX_FMT_YUV444P9:
case AV_PIX_FMT_YUV444P10:
case AV_PIX_FMT_YUV444P12:
--
2.52.0
>From 20f8e1dbc4e43d52966d90a03cb8bd8e1a1033a5 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Tue, 17 Feb 2026 21:10:03 +0100
Subject: [PATCH 05/89] avformat: replace fall-through comments
---
libavformat/id3v2.c | 3 ++-
libavformat/img2dec.c | 5 +++--
libavformat/matroskadec.c | 3 ++-
libavformat/mm.c | 3 ++-
libavformat/movenccenc.c | 5 +++--
libavformat/options.c | 3 ++-
libavformat/rtpenc.c | 5 +++--
libavformat/sbgdec.c | 3 ++-
libavformat/tls_libtls.c | 3 ++-
9 files changed, 21 insertions(+), 12 deletions(-)
diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
index 98969c67a0..3f14bfe3d6 100644
--- a/libavformat/id3v2.c
+++ b/libavformat/id3v2.c
@@ -27,6 +27,7 @@
*/
#include "config.h"
+#include "libavutil/attributes.h"
#if CONFIG_ZLIB
#include <zlib.h>
@@ -291,7 +292,7 @@ static int decode_str(AVFormatContext *s, AVIOContext *pb, int encoding,
*maxread = left;
return AVERROR_INVALIDDATA;
}
- // fall-through
+ av_fallthrough;
case ID3v2_ENCODING_UTF16BE:
while ((left > 1) && ch) {
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index ecb7ea8946..921458fea9 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -21,6 +21,7 @@
*/
#include "config_components.h"
+#include "libavutil/attributes.h"
#define _DEFAULT_SOURCE
#define _BSD_SOURCE
@@ -769,11 +770,11 @@ static int jpeg_probe(const AVProbeData *p)
case APP0:
if (c == APP0 && AV_RL32(&b[i + 4]) == MKTAG('J','F','I','F'))
got_header = 1;
- /* fallthrough */
+ av_fallthrough;
case APP1:
if (c == APP1 && AV_RL32(&b[i + 4]) == MKTAG('E','x','i','f'))
got_header = 1;
- /* fallthrough */
+ av_fallthrough;
case APP2:
case APP3:
case APP4:
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 503b99b286..1a584b1400 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -34,6 +34,7 @@
#include <inttypes.h>
#include <stdio.h>
+#include "libavutil/attributes.h"
#include "libavutil/avstring.h"
#include "libavutil/base64.h"
#include "libavutil/bprint.h"
@@ -2517,7 +2518,7 @@ static int mkv_parse_block_addition_mappings(AVFormatContext *s, AVStream *st, M
"Explicit block Addition Mapping type \"Use BlockAddIDValue\", value %"PRIu64","
" name \"%s\" found.\n", mapping->value, mapping->name ? mapping->name : "");
type = MATROSKA_BLOCK_ADD_ID_TYPE_OPAQUE;
- // fall-through
+ av_fallthrough;
case MATROSKA_BLOCK_ADD_ID_TYPE_OPAQUE:
case MATROSKA_BLOCK_ADD_ID_TYPE_ITU_T_T35:
if (mapping->value != type) {
diff --git a/libavformat/mm.c b/libavformat/mm.c
index 4e69da0519..dc2f02fbde 100644
--- a/libavformat/mm.c
+++ b/libavformat/mm.c
@@ -31,6 +31,7 @@
* http://wiki.multimedia.cx/index.php?title=American_Laser_Games_MM
*/
+#include "libavutil/attributes.h"
#include "libavutil/channel_layout.h"
#include "libavutil/intreadwrite.h"
#include "avformat.h"
@@ -190,7 +191,7 @@ static int read_packet(AVFormatContext *s,
default :
av_log(s, AV_LOG_INFO, "unknown chunk type 0x%x\n", type);
- /* fallthrough */
+ av_fallthrough;
case MM_TYPE_AUDIO2 :
avio_skip(pb, length);
}
diff --git a/libavformat/movenccenc.c b/libavformat/movenccenc.c
index e5ae11a9c9..4e1f31d2b5 100644
--- a/libavformat/movenccenc.c
+++ b/libavformat/movenccenc.c
@@ -22,6 +22,7 @@
#include "libavcodec/av1_parse.h"
#include "libavcodec/bytestream.h"
#include "libavcodec/cbs_av1.h"
+#include "libavutil/attributes.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "avio_internal.h"
@@ -422,7 +423,7 @@ int ff_mov_cenc_av1_write_obus(AVFormatContext *s, MOVMuxCencContext* ctx,
fh_data_size = unit->data_size;
break;
}
- // fall-through
+ av_fallthrough;
case AV1_OBU_SEQUENCE_HEADER:
case AV1_OBU_METADATA:
avio_write(pb, unit->data, unit->data_size);
@@ -433,7 +434,7 @@ int ff_mov_cenc_av1_write_obus(AVFormatContext *s, MOVMuxCencContext* ctx,
frame_header = &obu->obu.frame.header;
fh_data = unit->data;
fh_data_size = unit->data_size;
- // fall-through
+ av_fallthrough;
case AV1_OBU_TILE_GROUP:
{
const AV1RawTileGroup *tile_group;
diff --git a/libavformat/options.c b/libavformat/options.c
index d08013bfd4..b94fc95baa 100644
--- a/libavformat/options.c
+++ b/libavformat/options.c
@@ -26,6 +26,7 @@
#include "libavcodec/avcodec.h"
#include "libavcodec/codec_par.h"
+#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "libavutil/iamf.h"
#include "libavutil/internal.h"
@@ -393,7 +394,7 @@ static const AVClass *stream_group_child_iterate(void **opaque)
switch(i) {
case AV_STREAM_GROUP_PARAMS_NONE:
i++;
- // fall-through
+ av_fallthrough;
case AV_STREAM_GROUP_PARAMS_IAMF_AUDIO_ELEMENT:
ret = av_iamf_audio_element_get_class();
break;
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index 3602b081d5..3bf90d63a5 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -20,6 +20,7 @@
*/
#include "avformat.h"
+#include "libavutil/attributes.h"
#include "mpegts.h"
#include "internal.h"
#include "mux.h"
@@ -623,7 +624,7 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt)
ff_rtp_send_h263_rfc2190(s1, pkt->data, size, mb_info, mb_info_size);
break;
}
- /* Fallthrough */
+ av_fallthrough;
case AV_CODEC_ID_H263P:
ff_rtp_send_h263(s1, pkt->data, size);
break;
@@ -662,7 +663,7 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt)
size, s->max_payload_size);
return AVERROR(EINVAL);
}
- /* Intentional fallthrough */
+ av_fallthrough;
default:
/* better than nothing : send the codec raw data */
rtp_send_raw(s1, pkt->data, size);
diff --git a/libavformat/sbgdec.c b/libavformat/sbgdec.c
index 0e3d860d9f..71cbad2dae 100644
--- a/libavformat/sbgdec.c
+++ b/libavformat/sbgdec.c
@@ -22,6 +22,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
+#include "libavutil/attributes.h"
#include "libavutil/bprint.h"
#include "libavutil/channel_layout.h"
#include "libavutil/intreadwrite.h"
@@ -1118,7 +1119,7 @@ static int generate_interval(void *log, struct sbg_script *s,
case SBG_TYPE_SPIN:
av_log(log, AV_LOG_WARNING, "Spinning noise not implemented, "
"using pink noise instead.\n");
- /* fall through */
+ av_fallthrough;
case SBG_TYPE_NOISE:
/* SBaGen's pink noise generator uses:
- 1 band of white noise, mean square: 1/3;
diff --git a/libavformat/tls_libtls.c b/libavformat/tls_libtls.c
index 4f011ad67a..7210f6cd14 100644
--- a/libavformat/tls_libtls.c
+++ b/libavformat/tls_libtls.c
@@ -22,6 +22,7 @@
#include "avformat.h"
#include "internal.h"
+#include "libavutil/attributes.h"
#include "network.h"
#include "url.h"
#include "tls.h"
@@ -140,7 +141,7 @@ err_config:
err_ctx:
av_log(h, AV_LOG_ERROR, "%s\n", tls_error(p->ctx));
ret = AVERROR(EIO);
- /* fallthrough */
+ av_fallthrough;
fail:
if (cfg)
tls_config_free(cfg);
--
2.52.0
>From 18576340bcbb02fc2a5a758375548c094e6da552 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Tue, 17 Feb 2026 21:11:04 +0100
Subject: [PATCH 06/89] swscale: replace fall-through comments
---
libswscale/cms.c | 2 +-
libswscale/format.c | 5 +++--
libswscale/ops.c | 3 ++-
libswscale/ops_optimizer.c | 5 +++--
4 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/libswscale/cms.c b/libswscale/cms.c
index 3a1a438c49..dd468b6df7 100644
--- a/libswscale/cms.c
+++ b/libswscale/cms.c
@@ -574,7 +574,7 @@ static av_always_inline void update_hue_peaks(CmsCtx *ctx, float P, float T)
switch (ctx->map.intent) {
case SWS_INTENT_PERCEPTUAL:
ctx->tmp.peak = saturate(hue, ctx->tmp);
- /* fall through */
+ av_fallthrough;
case SWS_INTENT_RELATIVE_COLORIMETRIC:
case SWS_INTENT_ABSOLUTE_COLORIMETRIC:
ctx->dst.peak = saturate(hue, ctx->dst);
diff --git a/libswscale/format.c b/libswscale/format.c
index ea7b5b5ebe..7c2c3106a8 100644
--- a/libswscale/format.c
+++ b/libswscale/format.c
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "libavutil/hdr_dynamic_metadata.h"
#include "libavutil/mastering_display_metadata.h"
@@ -1307,7 +1308,7 @@ int ff_sws_decode_colors(SwsContext *ctx, SwsPixelType type,
case AVCOL_SPC_UNSPECIFIED:
c = av_csp_luma_coeffs_from_avcsp(AVCOL_SPC_BT470BG);
*incomplete = true;
- /* fall through */
+ av_fallthrough;
case AVCOL_SPC_FCC:
case AVCOL_SPC_BT470BG:
case AVCOL_SPC_SMPTE170M:
@@ -1376,7 +1377,7 @@ int ff_sws_encode_colors(SwsContext *ctx, SwsPixelType type,
case AVCOL_SPC_UNSPECIFIED:
c = av_csp_luma_coeffs_from_avcsp(AVCOL_SPC_BT470BG);
*incomplete = true;
- /* fall through */
+ av_fallthrough;
case AVCOL_SPC_FCC:
case AVCOL_SPC_BT470BG:
case AVCOL_SPC_SMPTE170M:
diff --git a/libswscale/ops.c b/libswscale/ops.c
index 83eb8e162e..abefb47751 100644
--- a/libswscale/ops.c
+++ b/libswscale/ops.c
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "libavutil/bswap.h"
#include "libavutil/mem.h"
@@ -266,7 +267,7 @@ void ff_sws_op_list_update_comps(SwsOpList *ops)
case SWS_OP_WRITE:
for (int i = 0; i < op->rw.elems; i++)
av_assert1(!(prev.flags[i] & SWS_COMP_GARBAGE));
- /* fall through */
+ av_fallthrough;
case SWS_OP_LSHIFT:
case SWS_OP_RSHIFT:
case SWS_OP_MIN:
diff --git a/libswscale/ops_optimizer.c b/libswscale/ops_optimizer.c
index 11ee40e268..05aee6377c 100644
--- a/libswscale/ops_optimizer.c
+++ b/libswscale/ops_optimizer.c
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "libavutil/bswap.h"
#include "libavutil/rational.h"
@@ -43,7 +44,7 @@ static bool op_commute_clear(SwsOp *op, SwsOp *next)
switch (next->op) {
case SWS_OP_CONVERT:
op->type = next->convert.to;
- /* fall through */
+ av_fallthrough;
case SWS_OP_LSHIFT:
case SWS_OP_RSHIFT:
case SWS_OP_DITHER:
@@ -84,7 +85,7 @@ static bool op_commute_swizzle(SwsOp *op, SwsOp *next)
switch (next->op) {
case SWS_OP_CONVERT:
op->type = next->convert.to;
- /* fall through */
+ av_fallthrough;
case SWS_OP_SWAP_BYTES:
case SWS_OP_LSHIFT:
case SWS_OP_RSHIFT:
--
2.52.0
>From 731c8276e63bc9aee703023f018ec9e18432d550 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Tue, 17 Feb 2026 21:11:28 +0100
Subject: [PATCH 07/89] avutil: replace fall-through comments
---
libavutil/channel_layout.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/libavutil/channel_layout.c b/libavutil/channel_layout.c
index cfa8e05d56..08865df2cb 100644
--- a/libavutil/channel_layout.c
+++ b/libavutil/channel_layout.c
@@ -32,6 +32,7 @@
#include "bprint.h"
#include "common.h"
#include "error.h"
+#include "attributes.h"
#include "macros.h"
#include "mem.h"
#include "opt.h"
@@ -608,7 +609,7 @@ int av_channel_layout_describe_bprint(const AVChannelLayout *channel_layout,
av_bprintf(bp, "%s", channel_layout_map[i].name);
return 0;
}
- // fall-through
+ av_fallthrough;
case AV_CHANNEL_ORDER_CUSTOM:
if (channel_layout->order == AV_CHANNEL_ORDER_CUSTOM) {
int64_t mask;
@@ -639,7 +640,7 @@ int av_channel_layout_describe_bprint(const AVChannelLayout *channel_layout,
av_bprintf(bp, ")");
return 0;
}
- // fall-through
+ av_fallthrough;
case AV_CHANNEL_ORDER_UNSPEC:
av_bprintf(bp, "%d channels", channel_layout->nb_channels);
return 0;
@@ -687,7 +688,7 @@ av_channel_layout_channel_from_index(const AVChannelLayout *channel_layout,
return AV_CHAN_AMBISONIC_BASE + idx;
idx -= ambi_channels;
}
- // fall-through
+ av_fallthrough;
case AV_CHANNEL_ORDER_NATIVE:
for (i = 0; i < 64; i++) {
if ((1ULL << i) & channel_layout->u.mask && !idx--)
@@ -768,7 +769,7 @@ int av_channel_layout_index_from_string(const AVChannelLayout *channel_layout,
(ch == AV_CHAN_NONE || ch == channel_layout->u.map[i].id))
return i;
}
- // fall-through
+ av_fallthrough;
case AV_CHANNEL_ORDER_AMBISONIC:
case AV_CHANNEL_ORDER_NATIVE:
ch = av_channel_from_string(str);
--
2.52.0
>From 324f9f6d1bd7a4a8d4e1221f5fc4a8812c08f31a Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Tue, 17 Feb 2026 21:14:14 +0100
Subject: [PATCH 08/89] avfilter: avf_showcqt: add fall-through annotation
---
libavfilter/avf_showcqt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavfilter/avf_showcqt.c b/libavfilter/avf_showcqt.c
index 7395b0bfc2..b2483fb4b7 100644
--- a/libavfilter/avf_showcqt.c
+++ b/libavfilter/avf_showcqt.c
@@ -19,6 +19,7 @@
*/
#include "config.h"
+#include "libavutil/attributes.h"
#include "libavutil/mem.h"
#include "libavutil/tx.h"
#include "libavutil/channel_layout.h"
@@ -1203,6 +1204,7 @@ static void init_colormatrix(ShowCQTContext *s)
default:
av_log(s->ctx, AV_LOG_WARNING, "unsupported colorspace, setting it to unspecified.\n");
s->csp = AVCOL_SPC_UNSPECIFIED;
+ av_fallthrough;
case AVCOL_SPC_UNSPECIFIED:
case AVCOL_SPC_BT470BG:
case AVCOL_SPC_SMPTE170M:
--
2.52.0
>From 2f18d149deb6e2e2f6a52000cdf2ccbe8e28a608 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Tue, 17 Feb 2026 21:15:41 +0100
Subject: [PATCH 09/89] avfilter: vf_v360: add missing break
Also replace an av_assert0 with av_unreachable.
---
libavfilter/vf_v360.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c
index a5297c81e9..005fd8cfa4 100644
--- a/libavfilter/vf_v360.c
+++ b/libavfilter/vf_v360.c
@@ -4427,7 +4427,7 @@ static int config_output(AVFilterLink *outlink)
in_offset_h = h;
break;
default:
- av_assert0(0);
+ av_unreachable("All valid cases are handled");
}
set_dimensions(s->inplanewidth, s->inplaneheight, w, h, desc);
@@ -4449,6 +4449,7 @@ static int config_output(AVFilterLink *outlink)
case FISHEYE:
default_ih_fov = 180.f;
default_iv_fov = 180.f;
+ break;
default:
break;
}
--
2.52.0
>From 3c49b9dce7c44ba2bc2bdf72761756fded8ce32b Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Tue, 17 Feb 2026 21:18:57 +0100
Subject: [PATCH 10/89] avcodec: videotoolbox: add missing fall-through
---
libavcodec/videotoolboxenc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
index 63e93b9d10..09431762fe 100644
--- a/libavcodec/videotoolboxenc.c
+++ b/libavcodec/videotoolboxenc.c
@@ -26,6 +26,7 @@
#include <TargetConditionals.h>
#include <VideoToolbox/VideoToolbox.h>
+#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "libavutil/imgutils.h"
#include "libavutil/mem.h"
@@ -548,6 +549,7 @@ static CMVideoCodecType get_cm_codec_type(AVCodecContext *avctx,
default:
av_log(avctx, AV_LOG_ERROR, "Unknown profile ID: %d, using auto\n", profile);
+ av_fallthrough;
case AV_PROFILE_UNKNOWN:
if (desc &&
((desc->flags & AV_PIX_FMT_FLAG_ALPHA) ||
--
2.52.0
>From de27f5e8a1a4bb8dbeb8e5cb83eaeb9ad7e61118 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Tue, 17 Feb 2026 21:19:19 +0100
Subject: [PATCH 11/89] avutil: hwcontext_videotoolbox: add missing
fall-through
---
libavutil/hwcontext_videotoolbox.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavutil/hwcontext_videotoolbox.c b/libavutil/hwcontext_videotoolbox.c
index 102fa485e5..3f4ad6f5cd 100644
--- a/libavutil/hwcontext_videotoolbox.c
+++ b/libavutil/hwcontext_videotoolbox.c
@@ -29,6 +29,7 @@
#include "hwcontext.h"
#include "hwcontext_internal.h"
#include "hwcontext_videotoolbox.h"
+#include "attributes.h"
#include "mem.h"
#include "pixfmt.h"
#include "pixdesc.h"
@@ -456,6 +457,7 @@ CFStringRef av_map_videotoolbox_color_matrix_from_av(enum AVColorSpace space)
#if HAVE_KCVIMAGEBUFFERTRANSFERFUNCTION_ITU_R_2100_HLG
if (__builtin_available(macOS 10.13, iOS 11, tvOS 11, watchOS 4, *))
return CVYCbCrMatrixGetStringForIntegerCodePoint(space);
+ av_fallthrough;
#endif
case AVCOL_SPC_UNSPECIFIED:
return NULL;
@@ -481,6 +483,7 @@ CFStringRef av_map_videotoolbox_color_primaries_from_av(enum AVColorPrimaries pr
#if HAVE_KCVIMAGEBUFFERTRANSFERFUNCTION_ITU_R_2100_HLG
if (__builtin_available(macOS 10.13, iOS 11, tvOS 11, watchOS 4, *))
return CVColorPrimariesGetStringForIntegerCodePoint(pri);
+ av_fallthrough;
#endif
case AVCOL_PRI_UNSPECIFIED:
return NULL;
@@ -528,6 +531,7 @@ CFStringRef av_map_videotoolbox_color_trc_from_av(enum AVColorTransferCharacteri
#if HAVE_KCVIMAGEBUFFERTRANSFERFUNCTION_ITU_R_2100_HLG
if (__builtin_available(macOS 10.13, iOS 11, tvOS 11, watchOS 4, *))
return CVTransferFunctionGetStringForIntegerCodePoint(trc);
+ av_fallthrough;
#endif
case AVCOL_TRC_UNSPECIFIED:
return NULL;
--
2.52.0
>From 4aeea58bb161c765066bf417b7dfbacb6e3f378c Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Tue, 17 Feb 2026 21:20:22 +0100
Subject: [PATCH 12/89] avutil: avsscanf: add missing break
---
libavutil/avsscanf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavutil/avsscanf.c b/libavutil/avsscanf.c
index 94f7710043..daa8f4929e 100644
--- a/libavutil/avsscanf.c
+++ b/libavutil/avsscanf.c
@@ -828,6 +828,7 @@ static int ff_vfscanf(FFFILE *f, const char *fmt, va_list ap)
switch (t) {
case 'c':
if (width < 1) width = 1;
+ break;
case '[':
break;
case 'n':
--
2.52.0
>From 658f350ffe51f0af12c8eab5bd9e72055d058d8a Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Tue, 17 Feb 2026 21:23:07 +0100
Subject: [PATCH 13/89] avutil: add missing fall-through annotation
---
libavutil/channel_layout.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavutil/channel_layout.c b/libavutil/channel_layout.c
index 08865df2cb..f63aace975 100644
--- a/libavutil/channel_layout.c
+++ b/libavutil/channel_layout.c
@@ -694,6 +694,7 @@ av_channel_layout_channel_from_index(const AVChannelLayout *channel_layout,
if ((1ULL << i) & channel_layout->u.mask && !idx--)
return i;
}
+ av_fallthrough;
default:
return AV_CHAN_NONE;
}
--
2.52.0
>From 0841d2f03ba83c7686b273aa2047d826d4d87211 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Tue, 17 Feb 2026 21:34:53 +0100
Subject: [PATCH 14/89] avcodec/zmbv: add missing fall-through annotation
---
libavcodec/zmbv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/zmbv.c b/libavcodec/zmbv.c
index f0bffd8966..947097bb4a 100644
--- a/libavcodec/zmbv.c
+++ b/libavcodec/zmbv.c
@@ -26,6 +26,7 @@
#include <stddef.h>
+#include "libavutil/attributes.h"
#include "libavutil/common.h"
#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
@@ -583,6 +584,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
case ZMBV_FMT_8BPP:
for (j = 0; j < 256; j++)
AV_WN32(&frame->data[1][j * 4], 0xFFU << 24 | AV_RB24(&c->pal[j * 3]));
+ av_fallthrough;
case ZMBV_FMT_15BPP:
case ZMBV_FMT_16BPP:
#ifdef ZMBV_ENABLE_24BPP
--
2.52.0
>From 35119d4d2ee9336f51b270b4343708822568c4a6 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Tue, 17 Feb 2026 21:55:43 +0100
Subject: [PATCH 15/89] avcodec: vmnc: add missing fall-through annotation
---
libavcodec/vmnc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/vmnc.c b/libavcodec/vmnc.c
index 6188aa7158..162e8ee9bb 100644
--- a/libavcodec/vmnc.c
+++ b/libavcodec/vmnc.c
@@ -25,6 +25,7 @@
* As Alex Beregszaszi discovered, this is effectively RFB data dump
*/
+#include "libavutil/attributes.h"
#include "libavutil/common.h"
#include "libavutil/mem.h"
#include "avcodec.h"
@@ -542,6 +543,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
/* 24 bits is not technically supported, but some clients might
* mistakenly set it, so let's assume they actually meant 32 bits */
c->bpp = 32;
+ av_fallthrough;
case 32:
avctx->pix_fmt = AV_PIX_FMT_0RGB32;
break;
--
2.52.0
>From 8469bbe8c3abe0891ae2736e36817276f53e3b02 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Tue, 17 Feb 2026 21:58:08 +0100
Subject: [PATCH 16/89] avcodec: vc1: add missing break
---
libavcodec/vc1.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index e365aaec84..ab247f0a7f 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -248,6 +248,7 @@ static int vop_dquant_decoding(VC1Context *v)
v->halfpq = 0;
return 0;
}
+ break;
default:
break; //Forbidden ?
}
--
2.52.0
>From 52ab367aa0feb68e6dd34b596325993e82cd844a Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Tue, 17 Feb 2026 21:59:06 +0100
Subject: [PATCH 17/89] avcodec: vb: add missing fall-through annotation
---
libavcodec/vb.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/vb.c b/libavcodec/vb.c
index 42d6f26f6c..bd5f786bd1 100644
--- a/libavcodec/vb.c
+++ b/libavcodec/vb.c
@@ -24,6 +24,7 @@
* VB Video decoder
*/
+#include "libavutil/attributes.h"
#include "libavutil/mem.h"
#include "avcodec.h"
#include "bytestream.h"
@@ -159,6 +160,7 @@ static int vb_decode_framedata(VBDecContext *c, int offset)
break;
case 1:
pattern = ~pattern;
+ av_fallthrough;
case 2:
a = bytestream2_get_byte(&g);
for (y = 0; y < 4; y++)
--
2.52.0
>From 33b37c0efb62b34fab3877e077f280e435044066 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Tue, 17 Feb 2026 22:00:50 +0100
Subject: [PATCH 18/89] avcodec: txd: add missing fall-through annotation
---
libavcodec/txd.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/txd.c b/libavcodec/txd.c
index d71e788e7d..24a6b6b5d3 100644
--- a/libavcodec/txd.c
+++ b/libavcodec/txd.c
@@ -25,6 +25,7 @@
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"
+#include "libavutil/attributes.h"
#include "texturedsp.h"
#define TXD_DXT1 0x31545844
@@ -72,6 +73,7 @@ static int txd_decode_frame(AVCodecContext *avctx, AVFrame *p,
case 0:
if (!(flags & 1))
goto unsupported;
+ av_fallthrough;
case TXD_DXT1:
if (bytestream2_get_bytes_left(&gb) < AV_CEIL_RSHIFT(w, 2) * AV_CEIL_RSHIFT(h, 2) * 8 + 4)
return AVERROR_INVALIDDATA;
--
2.52.0
>From 97f1b96a7c3372d4a202a5aa5ea6e7e07b2e2943 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:08:02 +0100
Subject: [PATCH 19/89] swscale: add fall-through annotations
---
libswscale/input.c | 14 ++++++++++++++
libswscale/swscale_unscaled.c | 9 +++++++++
2 files changed, 23 insertions(+)
diff --git a/libswscale/input.c b/libswscale/input.c
index eb4eb3101e..85816bebf8 100644
--- a/libswscale/input.c
+++ b/libswscale/input.c
@@ -22,6 +22,7 @@
#include <stddef.h>
#include <stdint.h>
+#include "libavutil/attributes.h"
#include "libavutil/bswap.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/avassert.h"
@@ -2302,31 +2303,37 @@ av_cold void ff_sws_init_input_funcs(SwsInternal *c,
break;
case AV_PIX_FMT_GBRAP10LE:
*readAlpPlanar = planar_rgb10le_to_a;
+ av_fallthrough;
case AV_PIX_FMT_GBRP10LE:
*readLumPlanar = planar_rgb10le_to_y;
break;
case AV_PIX_FMT_GBRAP12LE:
*readAlpPlanar = planar_rgb12le_to_a;
+ av_fallthrough;
case AV_PIX_FMT_GBRP12LE:
*readLumPlanar = planar_rgb12le_to_y;
break;
case AV_PIX_FMT_GBRAP14LE:
*readAlpPlanar = planar_rgb14le_to_a;
+ av_fallthrough;
case AV_PIX_FMT_GBRP14LE:
*readLumPlanar = planar_rgb14le_to_y;
break;
case AV_PIX_FMT_GBRAP16LE:
*readAlpPlanar = planar_rgb16le_to_a;
+ av_fallthrough;
case AV_PIX_FMT_GBRP16LE:
*readLumPlanar = planar_rgb16le_to_y;
break;
case AV_PIX_FMT_GBRAPF32LE:
*readAlpPlanar = planar_rgbf32le_to_a;
+ av_fallthrough;
case AV_PIX_FMT_GBRPF32LE:
*readLumPlanar = planar_rgbf32le_to_y;
break;
case AV_PIX_FMT_GBRAPF16LE:
*readAlpPlanar = planar_rgbf16le_to_a;
+ av_fallthrough;
case AV_PIX_FMT_GBRPF16LE:
*readLumPlanar = planar_rgbf16le_to_y;
break;
@@ -2341,31 +2348,37 @@ av_cold void ff_sws_init_input_funcs(SwsInternal *c,
break;
case AV_PIX_FMT_GBRAP10BE:
*readAlpPlanar = planar_rgb10be_to_a;
+ av_fallthrough;
case AV_PIX_FMT_GBRP10BE:
*readLumPlanar = planar_rgb10be_to_y;
break;
case AV_PIX_FMT_GBRAP12BE:
*readAlpPlanar = planar_rgb12be_to_a;
+ av_fallthrough;
case AV_PIX_FMT_GBRP12BE:
*readLumPlanar = planar_rgb12be_to_y;
break;
case AV_PIX_FMT_GBRAP14BE:
*readAlpPlanar = planar_rgb14be_to_a;
+ av_fallthrough;
case AV_PIX_FMT_GBRP14BE:
*readLumPlanar = planar_rgb14be_to_y;
break;
case AV_PIX_FMT_GBRAP16BE:
*readAlpPlanar = planar_rgb16be_to_a;
+ av_fallthrough;
case AV_PIX_FMT_GBRP16BE:
*readLumPlanar = planar_rgb16be_to_y;
break;
case AV_PIX_FMT_GBRAPF32BE:
*readAlpPlanar = planar_rgbf32be_to_a;
+ av_fallthrough;
case AV_PIX_FMT_GBRPF32BE:
*readLumPlanar = planar_rgbf32be_to_y;
break;
case AV_PIX_FMT_GBRAPF16BE:
*readAlpPlanar = planar_rgbf16be_to_a;
+ av_fallthrough;
case AV_PIX_FMT_GBRPF16BE:
*readLumPlanar = planar_rgbf16be_to_y;
break;
@@ -2377,6 +2390,7 @@ av_cold void ff_sws_init_input_funcs(SwsInternal *c,
break;
case AV_PIX_FMT_GBRAP:
*readAlpPlanar = planar_rgb_to_a;
+ av_fallthrough;
case AV_PIX_FMT_GBRP:
*readLumPlanar = planar_rgb_to_y;
break;
diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c
index c9feb84c8e..1476ea3f1f 100644
--- a/libswscale/swscale_unscaled.c
+++ b/libswscale/swscale_unscaled.c
@@ -23,6 +23,7 @@
#include <math.h>
#include <stdio.h>
#include "config.h"
+#include "libavutil/attributes.h"
#include "swscale.h"
#include "swscale_internal.h"
#include "rgb2rgb.h"
@@ -1287,6 +1288,7 @@ static int planarRgbaToRgbWrapper(SwsInternal *c, const uint8_t *const src[],
case AV_PIX_FMT_ARGB:
alpha_first = 1;
+ av_fallthrough;
case AV_PIX_FMT_RGBA:
gbraptopacked32(src201, stride201,
dst[0] + srcSliceY * dstStride[0], dstStride[0],
@@ -1295,6 +1297,7 @@ static int planarRgbaToRgbWrapper(SwsInternal *c, const uint8_t *const src[],
case AV_PIX_FMT_ABGR:
alpha_first = 1;
+ av_fallthrough;
case AV_PIX_FMT_BGRA:
gbraptopacked32(src102, stride102,
dst[0] + srcSliceY * dstStride[0], dstStride[0],
@@ -1343,6 +1346,7 @@ static int planarRgbToRgbWrapper(SwsInternal *c, const uint8_t *const src[],
case AV_PIX_FMT_ARGB:
alpha_first = 1;
+ av_fallthrough;
case AV_PIX_FMT_RGBA:
gbr24ptopacked32(src201, stride201,
dst[0] + srcSliceY * dstStride[0], dstStride[0],
@@ -1351,6 +1355,7 @@ static int planarRgbToRgbWrapper(SwsInternal *c, const uint8_t *const src[],
case AV_PIX_FMT_ABGR:
alpha_first = 1;
+ av_fallthrough;
case AV_PIX_FMT_BGRA:
gbr24ptopacked32(src102, stride102,
dst[0] + srcSliceY * dstStride[0], dstStride[0],
@@ -1445,12 +1450,14 @@ static int rgbToPlanarRgbWrapper(SwsInternal *c, const uint8_t *const src[],
break;
case AV_PIX_FMT_ARGB:
alpha_first = 1;
+ av_fallthrough;
case AV_PIX_FMT_RGBA:
packedtogbr24p((const uint8_t *) src[0], srcStride[0], dst201,
stride201, srcSliceH, alpha_first, 4, c->opts.src_w);
break;
case AV_PIX_FMT_ABGR:
alpha_first = 1;
+ av_fallthrough;
case AV_PIX_FMT_BGRA:
packedtogbr24p((const uint8_t *) src[0], srcStride[0], dst102,
stride102, srcSliceH, alpha_first, 4, c->opts.src_w);
@@ -1555,12 +1562,14 @@ static int rgbToPlanarRgbaWrapper(SwsInternal *c, const uint8_t *const src[],
break;
case AV_PIX_FMT_ARGB:
alpha_first = 1;
+ av_fallthrough;
case AV_PIX_FMT_RGBA:
packed32togbrap((const uint8_t *) src[0], srcStride[0], dst201,
stride201, srcSliceH, alpha_first, c->opts.src_w);
break;
case AV_PIX_FMT_ABGR:
alpha_first = 1;
+ av_fallthrough;
case AV_PIX_FMT_BGRA:
packed32togbrap((const uint8_t *) src[0], srcStride[0], dst102,
stride102, srcSliceH, alpha_first, c->opts.src_w);
--
2.52.0
>From 1e91de2aac6d669cb53efcf56d643f99ad616a8c Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:09:06 +0100
Subject: [PATCH 20/89] avformat: yuv4mpegdec: return proper error
The header is not invalid in this case, but ffmpeg still doesn't
support it.
---
libavformat/yuv4mpegdec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavformat/yuv4mpegdec.c b/libavformat/yuv4mpegdec.c
index 5c21858908..91d5a26fc1 100644
--- a/libavformat/yuv4mpegdec.c
+++ b/libavformat/yuv4mpegdec.c
@@ -151,6 +151,7 @@ static int yuv4_read_header(AVFormatContext *s)
case 'm':
av_log(s, AV_LOG_ERROR, "YUV4MPEG stream contains mixed "
"interlaced and non-interlaced frames.\n");
+ return AVERROR(ENOTSUP);
default:
av_log(s, AV_LOG_ERROR, "YUV4MPEG has invalid header.\n");
return AVERROR(EINVAL);
--
2.52.0
>From bbc9701670a95a8f08bc9a125b8c2f76ed1260e9 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:09:27 +0100
Subject: [PATCH 21/89] avformat: ty: add missing fall-through
---
libavformat/ty.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/ty.c b/libavformat/ty.c
index acd5e62157..c637c35e7c 100644
--- a/libavformat/ty.c
+++ b/libavformat/ty.c
@@ -23,6 +23,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "avformat.h"
@@ -691,6 +692,7 @@ static int ty_read_packet(AVFormatContext *s, AVPacket *pkt)
break;
default:
ff_dlog(s, "Invalid record type 0x%02x\n", rec->rec_type);
+ av_fallthrough;
case 0x01:
case 0x02:
case 0x03: /* TiVo data services */
--
2.52.0
>From a9e247e4324fcefedd0c003626576f610b2d2936 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:09:39 +0100
Subject: [PATCH 22/89] avformat: txd: add missing fall-through
---
libavformat/txd.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/txd.c b/libavformat/txd.c
index 4486db5e44..87d5226b72 100644
--- a/libavformat/txd.c
+++ b/libavformat/txd.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/intreadwrite.h"
#include "avformat.h"
#include "demux.h"
@@ -75,8 +76,10 @@ next_chunk:
case TXD_INFO:
if (chunk_size > 100)
break;
+ av_fallthrough;
case TXD_EXTRA:
avio_skip(s->pb, chunk_size);
+ av_fallthrough;
case TXD_FILE:
case TXD_TEXTURE:
goto next_chunk;
--
2.52.0
>From 1537dd707b23f688f1ca3c9ed02936e959e55410 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:09:55 +0100
Subject: [PATCH 23/89] avformat: takdec: add missing fall-through
---
libavformat/takdec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/takdec.c b/libavformat/takdec.c
index c1271601b5..04c98c295e 100644
--- a/libavformat/takdec.c
+++ b/libavformat/takdec.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/crc.h"
#include "libavutil/mem.h"
@@ -85,6 +86,7 @@ static int tak_read_header(AVFormatContext *s)
case TAK_METADATA_STREAMINFO:
if (st->codecpar->extradata)
return AVERROR_INVALIDDATA;
+ av_fallthrough;
case TAK_METADATA_LAST_FRAME:
case TAK_METADATA_ENCODER:
if (size <= 3)
--
2.52.0
>From 8ac3c7316082f3677cc9fd36313437d20fc55bac Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:10:24 +0100
Subject: [PATCH 24/89] avformat: rtmppkt: add missing fall-through
---
libavformat/rtmppkt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/rtmppkt.c b/libavformat/rtmppkt.c
index ec10c89fc8..9cf3763c1b 100644
--- a/libavformat/rtmppkt.c
+++ b/libavformat/rtmppkt.c
@@ -20,6 +20,7 @@
*/
#include "libavcodec/bytestream.h"
+#include "libavutil/attributes.h"
#include "libavutil/intfloat.h"
#include "libavutil/mem.h"
@@ -466,6 +467,7 @@ static int amf_tag_skip(GetByteContext *gb)
case AMF_DATA_TYPE_ARRAY:
case AMF_DATA_TYPE_MIXEDARRAY:
nb = bytestream2_get_be32(gb);
+ av_fallthrough;
case AMF_DATA_TYPE_OBJECT:
while (type != AMF_DATA_TYPE_ARRAY || nb-- > 0) {
int t;
--
2.52.0
>From ae6fc69d82603de460d7a289f49eae17d9a62d16 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:11:05 +0100
Subject: [PATCH 25/89] avformat: oggparsetheora: add missing fall-through
---
libavformat/oggparsetheora.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/oggparsetheora.c b/libavformat/oggparsetheora.c
index 6cdd962759..e104d63229 100644
--- a/libavformat/oggparsetheora.c
+++ b/libavformat/oggparsetheora.c
@@ -23,6 +23,7 @@
**/
#include <stdlib.h>
+#include "libavutil/attributes.h"
#include "libavutil/mem.h"
#include "libavcodec/get_bits.h"
#include "avformat.h"
@@ -117,6 +118,7 @@ static int theora_header(AVFormatContext *s, int idx)
break;
case 0x81:
ff_vorbis_stream_comment(s, st, os->buf + os->pstart + 7, os->psize - 7);
+ av_fallthrough;
case 0x82:
if (!thp->version)
return AVERROR_INVALIDDATA;
--
2.52.0
>From de1e6e559a5bf5b1d482106813092400dac0ad15 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:11:32 +0100
Subject: [PATCH 26/89] avformat: nuv: add missing fall-through
---
libavformat/nuv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/nuv.c b/libavformat/nuv.c
index 17a041b254..0938660c62 100644
--- a/libavformat/nuv.c
+++ b/libavformat/nuv.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/channel_layout.h"
#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
@@ -389,6 +390,7 @@ static int64_t nuv_read_dts(AVFormatContext *s, int stream_index,
*ppos = pos;
return dts;
}
+ av_fallthrough;
default:
avio_skip(pb, size);
break;
--
2.52.0
>From 28099ac9f39e5ef792ac28e440c9ab1d3d5963ce Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:11:44 +0100
Subject: [PATCH 27/89] avformat: nutdec: add missing fall-through
---
libavformat/nutdec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index 34b7e3cb9a..b0a997cad6 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -20,6 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/avstring.h"
#include "libavutil/avassert.h"
#include "libavutil/bswap.h"
@@ -1182,12 +1183,14 @@ static int nut_read_packet(AVFormatContext *s, AVPacket *pkt)
if (decode_syncpoint(nut, &ts, &back_ptr) < 0)
goto resync;
frame_code = avio_r8(bc);
+ av_fallthrough;
case 0:
ret = decode_frame(nut, pkt, frame_code);
if (ret == 0)
return 0;
else if (ret == 1) // OK but discard packet
break;
+ av_fallthrough;
default:
resync:
av_log(s, AV_LOG_DEBUG, "syncing from %"PRId64"\n", pos);
--
2.52.0
>From 8c8ddb6b3d192d4b3e06f5351c4d5b21b99c5d5f Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:11:56 +0100
Subject: [PATCH 28/89] avformat: network: add missing fall-through
---
libavformat/network.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/network.c b/libavformat/network.c
index a7026ac09b..5bfc28d80d 100644
--- a/libavformat/network.c
+++ b/libavformat/network.c
@@ -20,6 +20,7 @@
#include "config.h"
#include "config_components.h"
+#include "libavutil/attributes.h"
#if CONFIG_TLS_PROTOCOL && CONFIG_OPENSSL
#include <openssl/opensslv.h>
@@ -288,6 +289,7 @@ int ff_listen_connect(int fd, const struct sockaddr *addr,
av_log(h, AV_LOG_ERROR, "Connection to %s failed: %s\n",
h->filename, av_err2str(ret));
}
+ av_fallthrough;
default:
return ret;
}
--
2.52.0
>From ca67291ea44fb2101ec6104d684cf1bc3cac62b3 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:12:13 +0100
Subject: [PATCH 29/89] avformat: mxfenc: add missing fall-through
---
libavformat/mxfenc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index 12ef521779..1552d24e0c 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -40,6 +40,7 @@
#include <inttypes.h>
#include <time.h>
+#include "libavutil/attributes.h"
#include "libavutil/attributes_internal.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
@@ -1257,6 +1258,7 @@ static int64_t mxf_write_generic_picture_desc(AVFormatContext *s, AVStream *st)
if (sc->cid < 1270) // DNxHD
break;
// fall for DNxHR RI rasters
+ av_fallthrough;
case AV_CODEC_ID_MPEG2VIDEO:
case AV_CODEC_ID_H264:
//Based on 16x16 macroblocks
--
2.52.0
>From 9d65081f8c2d0e65c941ed8df82fb9960c826d99 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:12:36 +0100
Subject: [PATCH 30/89] avformat: mxfdec: add missing fall-through and break
---
libavformat/mxfdec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 59b9b43a22..a5a8417487 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -48,6 +48,7 @@
#include <time.h>
#include "libavutil/aes.h"
+#include "libavutil/attributes.h"
#include "libavutil/avstring.h"
#include "libavutil/mastering_display_metadata.h"
#include "libavutil/mathematics.h"
@@ -423,6 +424,7 @@ static void mxf_free_metadataset(MXFMetadataSet **ctx, enum MXFMetadataSetType t
av_freep(&seg->temporal_offset_entries);
av_freep(&seg->flag_entries);
av_freep(&seg->stream_offset_entries);
+ break;
default:
break;
}
@@ -2926,6 +2928,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
break;
case SegmentedFrame:
st->codecpar->field_order = AV_FIELD_PROGRESSIVE;
+ av_fallthrough;
case SeparateFields:
av_log(mxf->fc, AV_LOG_DEBUG, "video_line_map: (%d, %d), field_dominance: %d\n",
descriptor->video_line_map[0], descriptor->video_line_map[1],
--
2.52.0
>From 9fb4c39a8084f3c67e372525c20cc30f880a0d28 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:12:51 +0100
Subject: [PATCH 31/89] avformat: mov: add missing fall-throughs
---
libavformat/mov.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 1a4450153f..54799d28d1 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2357,8 +2357,10 @@ static int mov_read_ares(MOVContext *c, AVIOContext *pb, MOVAtom atom)
if (den >= INT_MAX / 2)
return 0;
den *= 2;
+ av_fallthrough;
case 1:
sti->display_aspect_ratio = (AVRational){ num, den };
+ av_fallthrough;
default:
return 0;
}
@@ -9683,6 +9685,7 @@ static int mov_probe(const AVProbeData *p)
/* check for obvious tags */
case MKTAG('m','o','o','v'):
moov_offset = offset + 4;
+ av_fallthrough;
case MKTAG('m','d','a','t'):
case MKTAG('p','n','o','t'): /* detect movs with preview pics like ew.mov and april.mov */
case MKTAG('u','d','t','a'): /* Packet Video PVAuthor adds this and a lot of more junk */
--
2.52.0
>From 32e088716d32881782622e14ef9e65e488994bc1 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:13:09 +0100
Subject: [PATCH 32/89] avformat: matroskadec: add missing break
---
libavformat/matroskadec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 1a584b1400..097bb332cc 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1603,6 +1603,7 @@ static void ebml_free(EbmlSyntax *syntax, void *data)
list->alloc_elem_size = 0;
} else
ebml_free(syntax[i].def.n, data_off);
+ break;
default:
break;
}
--
2.52.0
>From 8c970d47c3437ee5b7ee7c957fea501f333529f8 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:13:27 +0100
Subject: [PATCH 33/89] avformat: lvfdec: add missing fall-through
---
libavformat/lvfdec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/lvfdec.c b/libavformat/lvfdec.c
index cd013844fb..daa9bd0322 100644
--- a/libavformat/lvfdec.c
+++ b/libavformat/lvfdec.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/intreadwrite.h"
#include "avformat.h"
#include "demux.h"
@@ -120,6 +121,7 @@ static int lvf_read_packet(AVFormatContext *s, AVPacket *pkt)
switch (id) {
case MKTAG('0', '0', 'd', 'c'):
is_video = 1;
+ av_fallthrough;
case MKTAG('0', '1', 'w', 'b'):
if (size < 8)
return AVERROR_INVALIDDATA;
--
2.52.0
>From 0e79c599ffa033b6ce1e6f94df6034987915619f Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:13:44 +0100
Subject: [PATCH 34/89] avformat: lmlm4: add missing fall-through
---
libavformat/lmlm4.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/lmlm4.c b/libavformat/lmlm4.c
index aeb5580620..c01304dd45 100644
--- a/libavformat/lmlm4.c
+++ b/libavformat/lmlm4.c
@@ -22,6 +22,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/intreadwrite.h"
#include "avformat.h"
@@ -110,6 +111,7 @@ static int lmlm4_read_packet(AVFormatContext *s, AVPacket *pkt)
switch (frame_type) {
case LMLM4_I_FRAME:
pkt->flags = AV_PKT_FLAG_KEY;
+ av_fallthrough;
case LMLM4_P_FRAME:
case LMLM4_B_FRAME:
pkt->stream_index = 0;
--
2.52.0
>From 4c5c8570becda25b05358881873e919b06b7a6a4 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:14:01 +0100
Subject: [PATCH 35/89] avformat: jacobsubdec: add missing fall-through
---
libavformat/jacosubdec.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/libavformat/jacosubdec.c b/libavformat/jacosubdec.c
index da150a96ab..3c3f1b32e3 100644
--- a/libavformat/jacosubdec.c
+++ b/libavformat/jacosubdec.c
@@ -28,6 +28,7 @@
#include "avformat.h"
#include "demux.h"
#include "internal.h"
+#include "libavutil/attributes.h"
#include "subtitles.h"
#include "libavcodec/jacosub.h"
#include "libavutil/avstring.h"
@@ -144,9 +145,9 @@ static int get_shift(unsigned timeres, const char *buf)
ret = 0;
switch (n) {
- case 1: h = 0; //clear all in case of a single parameter
- case 2: s = m; m = h; h = 0; //shift into second subsecondd
- case 3: d = s; s = m; m = h; h = 0; //shift into minute second subsecond
+ case 1: h = 0; av_fallthrough; //clear all in case of a single parameter
+ case 2: s = m; m = h; h = 0; av_fallthrough; //shift into second subsecondd
+ case 3: d = s; s = m; m = h; h = 0; //shift into minute second subsecond
}
ret = (int64_t)h*3600 + (int64_t)m*60 + s;
--
2.52.0
>From e3613c18f6dfb2637dd96918976a2aa2572bff30 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:14:27 +0100
Subject: [PATCH 36/89] avformat: idroqdec: add missing fall-through
---
libavformat/idroqdec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/idroqdec.c b/libavformat/idroqdec.c
index 9c3aaec260..861338ceec 100644
--- a/libavformat/idroqdec.c
+++ b/libavformat/idroqdec.c
@@ -27,6 +27,7 @@
* http://www.csse.monash.edu.au/~timf/
*/
+#include "libavutil/attributes.h"
#include "libavutil/channel_layout.h"
#include "libavutil/intreadwrite.h"
#include "avformat.h"
@@ -195,6 +196,7 @@ static int roq_read_packet(AVFormatContext *s,
st->codecpar->bits_per_coded_sample;
st->codecpar->block_align = roq->audio_channels * st->codecpar->bits_per_coded_sample;
}
+ av_fallthrough;
case RoQ_QUAD_VQ:
if (chunk_type == RoQ_QUAD_VQ) {
if (roq->video_stream_index < 0)
--
2.52.0
>From c58a6b61b72bee6c7b9e20e7444aebab2fad11d1 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:14:39 +0100
Subject: [PATCH 37/89] avformat: id3v2: add missing break
---
libavformat/id3v2.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
index 3f14bfe3d6..4a9b5a66d7 100644
--- a/libavformat/id3v2.c
+++ b/libavformat/id3v2.c
@@ -281,6 +281,7 @@ static int decode_str(AVFormatContext *s, AVIOContext *pb, int encoding,
switch (bom) {
case 0xfffe:
get = avio_rl16;
+ break;
case 0xfeff:
break;
case 0: // empty string without bom
--
2.52.0
>From 09a56943552a58a0ce6364f5d0874498ba96b038 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:14:54 +0100
Subject: [PATCH 38/89] avformat: flvenc: add missing fall-through
---
libavformat/flvenc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index a0503c1799..323983e8ed 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/dict.h"
#include "libavutil/intfloat.h"
@@ -183,6 +184,7 @@ static int get_audio_flags(AVFormatContext *s, AVCodecParameters *par)
flags |= FLV_SAMPLERATE_SPECIAL;
break;
}
+ av_fallthrough;
default:
error:
av_log(s, AV_LOG_ERROR,
--
2.52.0
>From 9e4abeed4005e952938dd5d9e0fe87d71306fdef Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:15:13 +0100
Subject: [PATCH 39/89] avformat: flvdec: add missing fall-through
---
libavformat/flvdec.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 18bdbd18bd..6d14456253 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -24,6 +24,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/channel_layout.h"
@@ -457,6 +458,7 @@ static int flv_set_video_codec(AVFormatContext *s, AVStream *vstream,
break;
case FLV_CODECID_VP6:
par->codec_id = AV_CODEC_ID_VP6F;
+ av_fallthrough;
case FLV_CODECID_VP6A:
if (flv_codecid == FLV_CODECID_VP6A)
par->codec_id = AV_CODEC_ID_VP6A;
@@ -1058,10 +1060,12 @@ static int amf_skip_tag(AVIOContext *pb, AMFDataType type, int depth)
break;
case AMF_DATA_TYPE_ARRAY:
parse_name = 0;
+ av_fallthrough;
case AMF_DATA_TYPE_MIXEDARRAY:
nb = avio_rb32(pb);
if (nb < 0)
return AVERROR_INVALIDDATA;
+ av_fallthrough;
case AMF_DATA_TYPE_OBJECT:
while(!pb->eof_reached && (nb-- > 0 || type != AMF_DATA_TYPE_ARRAY)) {
if (parse_name) {
@@ -1098,8 +1102,10 @@ static int flv_data_packet(AVFormatContext *s, AVPacket *pkt,
switch (avio_r8(pb)) {
case AMF_DATA_TYPE_ARRAY:
array = 1;
+ av_fallthrough;
case AMF_DATA_TYPE_MIXEDARRAY:
avio_seek(pb, 4, SEEK_CUR);
+ av_fallthrough;
case AMF_DATA_TYPE_OBJECT:
break;
default:
--
2.52.0
>From e8eb4a3c5790529168a89d5b76046f115301be2d Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:15:26 +0100
Subject: [PATCH 40/89] avformat: epafdec: add missing fall-through
---
libavformat/epafdec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/epafdec.c b/libavformat/epafdec.c
index f2701b60ca..f897737b60 100644
--- a/libavformat/epafdec.c
+++ b/libavformat/epafdec.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/intreadwrite.h"
#include "libavcodec/internal.h"
#include "avformat.h"
@@ -80,6 +81,7 @@ static int epaf_read_header(AVFormatContext *s)
break;
case 1:
avpriv_request_sample(s, "24-bit Paris PCM format");
+ av_fallthrough;
default:
return AVERROR_INVALIDDATA;
}
--
2.52.0
>From ab0e2c0365d2f4b31893a39989ffa8cec0e00aea Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:15:43 +0100
Subject: [PATCH 41/89] avformat: electronicarts: add missing fall-through
---
libavformat/electronicarts.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index 74a050fec6..9361e343c2 100644
--- a/libavformat/electronicarts.c
+++ b/libavformat/electronicarts.c
@@ -27,6 +27,7 @@
#include <inttypes.h>
+#include "libavutil/attributes.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"
#include "avformat.h"
@@ -614,6 +615,7 @@ static int ea_read_packet(AVFormatContext *s, AVPacket *pkt)
return AVERROR_INVALIDDATA;
avio_skip(pb, 32);
chunk_size -= 32;
+ av_fallthrough;
case ISNd_TAG:
case SCDl_TAG:
case SNDC_TAG:
@@ -709,6 +711,7 @@ static int ea_read_packet(AVFormatContext *s, AVPacket *pkt)
case TGQs_TAG:
case MADk_TAG:
key = AV_PKT_FLAG_KEY;
+ av_fallthrough;
case MVIf_TAG:
case fVGT_TAG:
case MADm_TAG:
@@ -732,6 +735,7 @@ static int ea_read_packet(AVFormatContext *s, AVPacket *pkt)
case MPCh_TAG:
case pIQT_TAG:
key = AV_PKT_FLAG_KEY;
+ av_fallthrough;
case MV0F_TAG:
case AV0F_TAG:
get_video_packet:
--
2.52.0
>From 73a7e53d1c432bd80d7a6c8592e309aa46f02d27 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:15:53 +0100
Subject: [PATCH 42/89] avformat: concat: add missing fall-through
---
libavformat/concat.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/concat.c b/libavformat/concat.c
index e1d57de557..d8162b8778 100644
--- a/libavformat/concat.c
+++ b/libavformat/concat.c
@@ -25,6 +25,7 @@
#include "config_components.h"
+#include "libavutil/attributes.h"
#include "libavutil/avstring.h"
#include "libavutil/bprint.h"
#include "libavutil/error.h"
@@ -179,6 +180,7 @@ static int64_t concat_seek(URLContext *h, int64_t pos, int whence)
pos += ffurl_seek(nodes[i].uc, 0, SEEK_CUR);
whence = SEEK_SET;
/* fall through with the absolute position */
+ av_fallthrough;
case SEEK_SET:
for (i = 0; i != data->length - 1 && pos >= nodes[i].size; i++)
pos -= nodes[i].size;
--
2.52.0
>From 7c80d289daa70ba5b6646e7c930cd947275310bd Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:16:02 +0100
Subject: [PATCH 43/89] avformat: cafdec: add missing fall-through
---
libavformat/cafdec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c
index 1557391ef3..a7789aee59 100644
--- a/libavformat/cafdec.c
+++ b/libavformat/cafdec.c
@@ -33,6 +33,7 @@
#include "demux.h"
#include "internal.h"
#include "isom.h"
+#include "libavutil/attributes.h"
#include "mov_chan.h"
#include "libavcodec/flac.h"
#include "libavutil/intreadwrite.h"
@@ -419,6 +420,7 @@ static int read_header(AVFormatContext *s)
av_log(s, AV_LOG_WARNING,
"skipping CAF chunk: %08"PRIX32" (%s), size %"PRId64"\n",
tag, av_fourcc2str(av_bswap32(tag)), size);
+ av_fallthrough;
case MKBETAG('f','r','e','e'):
if (size < 0 && found_data)
goto found_data;
--
2.52.0
>From 66e0c73cd4cb85c3283cb4330895b6a45f2dda2a Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:16:17 +0100
Subject: [PATCH 44/89] avformat: bethsoftvid: add missing fall-through
---
libavformat/bethsoftvid.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/bethsoftvid.c b/libavformat/bethsoftvid.c
index f118f668f1..b8cdeea8de 100644
--- a/libavformat/bethsoftvid.c
+++ b/libavformat/bethsoftvid.c
@@ -27,6 +27,7 @@
* @see http://www.svatopluk.com/andux/docs/dfvid.html
*/
+#include "libavutil/attributes.h"
#include "libavutil/channel_layout.h"
#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
@@ -247,6 +248,7 @@ static int vid_read_packet(AVFormatContext *s,
avio_rl16(pb);
// soundblaster DAC used for sample rate, as on specification page (link above)
vid->sample_rate = 1000000 / (256 - avio_r8(pb));
+ av_fallthrough;
case AUDIO_BLOCK:
if (vid->audio_index < 0) {
AVStream *st = avformat_new_stream(s, NULL);
--
2.52.0
>From 4279a8e3302286aba9fbcccb9fa926c41b7b73af Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:16:30 +0100
Subject: [PATCH 45/89] avformat: avienc: add missing fall-through
---
libavformat/avienc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/avienc.c b/libavformat/avienc.c
index 2a3cff1210..a8ae260138 100644
--- a/libavformat/avienc.c
+++ b/libavformat/avienc.c
@@ -25,6 +25,7 @@
#include "internal.h"
#include "avi.h"
#include "avio_internal.h"
+#include "libavutil/attributes.h"
#include "riff.h"
#include "mpegts.h"
#include "mux.h"
@@ -369,6 +370,7 @@ static int avi_write_header(AVFormatContext *s)
avpriv_report_missing_feature(s, "Subtitle streams other than DivX XSUB");
return AVERROR_PATCHWELCOME;
}
+ av_fallthrough;
case AVMEDIA_TYPE_VIDEO:
ffio_wfourcc(pb, "vids");
break;
@@ -446,6 +448,7 @@ static int avi_write_header(AVFormatContext *s)
* are not (yet) supported. */
if (par->codec_id != AV_CODEC_ID_XSUB)
break;
+ av_fallthrough;
case AVMEDIA_TYPE_VIDEO:
/* WMP expects RGB 5:5:5 rawvideo in avi to have bpp set to 16. */
if ( !par->codec_tag
--
2.52.0
>From ff991f8c2baf5813b2e6e33169249086c096dc5c Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:16:38 +0100
Subject: [PATCH 46/89] avformat: avidec: add missing fall-through
---
libavformat/avidec.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 8fb6931e5d..96c34abd28 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -23,6 +23,7 @@
#include <inttypes.h>
+#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/mem.h"
@@ -583,6 +584,7 @@ static int avi_read_header(AVFormatContext *s)
break;
case MKTAG('a', 'm', 'v', 'h'):
amv_file_format = 1;
+ av_fallthrough;
case MKTAG('a', 'v', 'i', 'h'):
/* AVI header */
/* using frame_period is bad idea */
@@ -1043,6 +1045,7 @@ static int avi_read_header(AVFormatContext *s)
return ret;
break;
}
+ av_fallthrough;
default:
if (size > 1000000) {
av_log(s, AV_LOG_ERROR,
@@ -1056,6 +1059,7 @@ static int avi_read_header(AVFormatContext *s)
avi->movi_end = avi->fsize;
goto end_of_header;
}
+ av_fallthrough;
/* Do not fail for very large idx1 tags */
case MKTAG('i', 'd', 'x', '1'):
/* skip tag */
--
2.52.0
>From e812dcb7c1fb18839bc7138f40805e4d22747161 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:16:51 +0100
Subject: [PATCH 47/89] avformat: aiffdec: add missing fall-through
---
libavformat/aiffdec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index ff47d8dc7b..645067b078 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/dict.h"
#include "libavutil/mem.h"
@@ -164,6 +165,7 @@ static int get_aiff_header(AVFormatContext *s, int64_t size,
break;
case AV_CODEC_ID_ADPCM_G726LE:
par->bits_per_coded_sample = 5;
+ av_fallthrough;
case AV_CODEC_ID_ADPCM_IMA_WS:
case AV_CODEC_ID_ADPCM_G722:
case AV_CODEC_ID_MACE6:
@@ -384,6 +386,7 @@ static int aiff_read_header(AVFormatContext *s)
case 0:
if (offset > 0 && st->codecpar->block_align) // COMM && SSND
goto got_sound;
+ av_fallthrough;
default: /* Jump */
avio_skip(pb, size);
}
--
2.52.0
>From f8739b15b4a92c4aaf3951a2b4adfaabe095f20f Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:17:07 +0100
Subject: [PATCH 48/89] avfilter: vf_negate: add missing fall-through
---
libavfilter/vf_negate.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/libavfilter/vf_negate.c b/libavfilter/vf_negate.c
index f61f7ebbbb..c4774eee8a 100644
--- a/libavfilter/vf_negate.c
+++ b/libavfilter/vf_negate.c
@@ -16,6 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/common.h"
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
@@ -131,9 +132,9 @@ static void negate_packed8(const uint8_t *ssrc, uint8_t *ddst,
for (int x = 0; x < w; x++) {
switch (step) {
- case 4: dst[3] = components & 8 ? 255 - src[3] : src[3];
- case 3: dst[2] = components & 4 ? 255 - src[2] : src[2];
- case 2: dst[1] = components & 2 ? 255 - src[1] : src[1];
+ case 4: dst[3] = components & 8 ? 255 - src[3] : src[3]; av_fallthrough;
+ case 3: dst[2] = components & 4 ? 255 - src[2] : src[2]; av_fallthrough;
+ case 2: dst[1] = components & 2 ? 255 - src[1] : src[1]; av_fallthrough;
default: dst[0] = components & 1 ? 255 - src[0] : src[0];
}
@@ -174,9 +175,9 @@ static void negate_packed16(const uint8_t *ssrc, uint8_t *ddst,
for (int x = 0; x < w; x++) {
switch (step) {
- case 4: dst[3] = components & 8 ? max - src[3] : src[3];
- case 3: dst[2] = components & 4 ? max - src[2] : src[2];
- case 2: dst[1] = components & 2 ? max - src[1] : src[1];
+ case 4: dst[3] = components & 8 ? max - src[3] : src[3]; av_fallthrough;
+ case 3: dst[2] = components & 4 ? max - src[2] : src[2]; av_fallthrough;
+ case 2: dst[1] = components & 2 ? max - src[1] : src[1]; av_fallthrough;
default: dst[0] = components & 1 ? max - src[0] : src[0];
}
--
2.52.0
>From 7ffdef255a10cb8f451712a752546b7774e15255 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:17:21 +0100
Subject: [PATCH 49/89] avfilter: af_biquads: add missing fall-through
---
libavfilter/af_biquads.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavfilter/af_biquads.c b/libavfilter/af_biquads.c
index 565da30391..86ddeb17fb 100644
--- a/libavfilter/af_biquads.c
+++ b/libavfilter/af_biquads.c
@@ -64,6 +64,7 @@
#include "config_components.h"
+#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h"
#include "libavutil/ffmath.h"
@@ -857,6 +858,7 @@ static int config_filter(AVFilterLink *outlink, int reset)
break;
case bass:
beta = sqrt((A * A + 1) - (A - 1) * (A - 1));
+ av_fallthrough;
case tiltshelf:
case lowshelf:
if (s->poles == 1) {
@@ -884,6 +886,7 @@ static int config_filter(AVFilterLink *outlink, int reset)
break;
case treble:
beta = sqrt((A * A + 1) - (A - 1) * (A - 1));
+ av_fallthrough;
case highshelf:
if (s->poles == 1) {
double A = ff_exp10(gain / 20);
--
2.52.0
>From ef0399d6bca5a473ff743c64825fe6479ca7aebc Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:17:36 +0100
Subject: [PATCH 50/89] avcodec: wavpackdec: add missing fall-through
---
libavcodec/wavpackenc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/wavpackenc.c b/libavcodec/wavpackenc.c
index a89f3d1670..12010d699b 100644
--- a/libavcodec/wavpackenc.c
+++ b/libavcodec/wavpackenc.c
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#define BITSTREAM_WRITER_LE
#include "libavutil/channel_layout.h"
@@ -2844,6 +2845,7 @@ static void fill_buffer(WavPackEncodeContext *s,
COPY_SAMPLES(int32_t, 0, 8);
break;
}
+ av_fallthrough;
case AV_SAMPLE_FMT_FLTP:
memcpy(dst, src, nb_samples * 4);
}
--
2.52.0
>From 866ba46568bfc1a180c41adc01d1eb9fc0caf130 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:17:48 +0100
Subject: [PATCH 51/89] avcodec: tiffenc: add missing fall-through
---
libavcodec/tiffenc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/tiffenc.c b/libavcodec/tiffenc.c
index 1916db9a31..e53ba6f034 100644
--- a/libavcodec/tiffenc.c
+++ b/libavcodec/tiffenc.c
@@ -26,6 +26,7 @@
*/
#include "config.h"
+#include "libavutil/attributes.h"
#if CONFIG_ZLIB
#include <zlib.h>
#endif
@@ -278,15 +279,18 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
case AV_PIX_FMT_RGBA64LE:
case AV_PIX_FMT_RGBA:
alpha = 1;
+ av_fallthrough;
case AV_PIX_FMT_RGB48LE:
case AV_PIX_FMT_RGB24:
s->photometric_interpretation = TIFF_PHOTOMETRIC_RGB;
break;
case AV_PIX_FMT_GRAY8:
avctx->bits_per_coded_sample = 0x28;
+ av_fallthrough;
case AV_PIX_FMT_GRAY8A:
case AV_PIX_FMT_YA16LE:
alpha = avctx->pix_fmt == AV_PIX_FMT_GRAY8A || avctx->pix_fmt == AV_PIX_FMT_YA16LE;
+ av_fallthrough;
case AV_PIX_FMT_GRAY16LE:
case AV_PIX_FMT_MONOBLACK:
s->photometric_interpretation = TIFF_PHOTOMETRIC_BLACK_IS_ZERO;
--
2.52.0
>From 901e007d7e608963206f215e794c19dfbfd019f5 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:18:02 +0100
Subject: [PATCH 52/89] avcodec: tiff: add missing fall-through
---
libavcodec/tiff.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index bb8120bc1b..3e261c99f5 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -1061,6 +1061,7 @@ static int init_image(TiffContext *s, AVFrame *frame)
s->avctx->pix_fmt = AV_PIX_FMT_MONOBLACK;
break;
}
+ av_fallthrough;
case 21:
case 41:
s->avctx->pix_fmt = AV_PIX_FMT_PAL8;
--
2.52.0
>From f9a0887a7c6e31dc68a426f54acdd54502da0a81 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:18:15 +0100
Subject: [PATCH 53/89] avcodec: takdec: add missing fall-through
---
libavcodec/takdec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/takdec.c b/libavcodec/takdec.c
index 42a43e8695..ff77c3bfc6 100644
--- a/libavcodec/takdec.c
+++ b/libavcodec/takdec.c
@@ -25,6 +25,7 @@
* @author Paul B Mahol
*/
+#include "libavutil/attributes.h"
#include "libavutil/internal.h"
#include "libavutil/mem.h"
#include "libavutil/mem_internal.h"
@@ -582,6 +583,7 @@ static int decorrelate(TAKDecContext *s, int c1, int c2, int length)
case 4: /* side/left with scale factor */
FFSWAP(int32_t*, p1, p2);
FFSWAP(int32_t, bp1, bp2);
+ av_fallthrough;
case 5: /* side/right with scale factor */
dshift = get_bits_esc4(gb);
dfactor = get_sbits(gb, 10);
@@ -589,6 +591,7 @@ static int decorrelate(TAKDecContext *s, int c1, int c2, int length)
break;
case 6:
FFSWAP(int32_t*, p1, p2);
+ av_fallthrough;
case 7: {
int length2, order_half, filter_order, dval1, dval2;
int tmp, x, code_size;
--
2.52.0
>From e8af2d745441f6dab7302fab9a2ef63cf880cace Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:18:28 +0100
Subject: [PATCH 54/89] avcodec: svq1dec: add missing fall-through
---
libavcodec/svq1dec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c
index 5505b896a2..a4b5042090 100644
--- a/libavcodec/svq1dec.c
+++ b/libavcodec/svq1dec.c
@@ -558,6 +558,7 @@ static int svq1_decode_frame_header(AVCodecContext *avctx, AVFrame *frame, int *
break;
case 2:
s->nonref = 1;
+ av_fallthrough;
case 1:
frame->pict_type = AV_PICTURE_TYPE_P;
break;
--
2.52.0
>From 0d69a12e7eee4e330973b5293923a9599f950e12 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:18:40 +0100
Subject: [PATCH 55/89] avcodec: sheervideo: add missing fall-through
---
libavcodec/sheervideo.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/sheervideo.c b/libavcodec/sheervideo.c
index ef20633e1f..3cea84e4ea 100644
--- a/libavcodec/sheervideo.c
+++ b/libavcodec/sheervideo.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#define CACHED_BITSTREAM_READER !ARCH_X86_32
#define SHEER_VLC_BITS 12
@@ -1863,6 +1864,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p,
break;
case MKTAG('A', 'Y', 'B', 'R'):
s->alt = 1;
+ av_fallthrough;
case MKTAG('A', 'Y', 'b', 'R'):
avctx->pix_fmt = AV_PIX_FMT_YUVA444P;
s->decode_frame = decode_aybr;
@@ -1870,6 +1872,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p,
break;
case MKTAG('A', 'y', 'B', 'R'):
s->alt = 1;
+ av_fallthrough;
case MKTAG('A', 'y', 'b', 'R'):
avctx->pix_fmt = AV_PIX_FMT_YUVA444P;
s->decode_frame = decode_aybri;
@@ -1877,6 +1880,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p,
break;
case MKTAG(' ', 'Y', 'B', 'R'):
s->alt = 1;
+ av_fallthrough;
case MKTAG(' ', 'Y', 'b', 'R'):
avctx->pix_fmt = AV_PIX_FMT_YUV444P;
s->decode_frame = decode_ybr;
@@ -1884,6 +1888,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p,
break;
case MKTAG(' ', 'y', 'B', 'R'):
s->alt = 1;
+ av_fallthrough;
case MKTAG(' ', 'y', 'b', 'R'):
avctx->pix_fmt = AV_PIX_FMT_YUV444P;
s->decode_frame = decode_ybri;
--
2.52.0
>From 029f1bc40ce78aae21b2dd78a24c85a1a97ccad0 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:18:52 +0100
Subject: [PATCH 56/89] avcodec: sgienc: add missing fall-through
---
libavcodec/sgienc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/sgienc.c b/libavcodec/sgienc.c
index 93ec9ff6cf..a6ec443970 100644
--- a/libavcodec/sgienc.c
+++ b/libavcodec/sgienc.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
@@ -123,6 +124,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
break;
case AV_PIX_FMT_GRAY16LE:
put_be = !HAVE_BIGENDIAN;
+ av_fallthrough;
case AV_PIX_FMT_GRAY16BE:
bytes_per_channel = 2;
pixmax = 0xFFFF;
@@ -131,6 +133,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
break;
case AV_PIX_FMT_RGB48LE:
put_be = !HAVE_BIGENDIAN;
+ av_fallthrough;
case AV_PIX_FMT_RGB48BE:
bytes_per_channel = 2;
pixmax = 0xFFFF;
@@ -139,6 +142,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
break;
case AV_PIX_FMT_RGBA64LE:
put_be = !HAVE_BIGENDIAN;
+ av_fallthrough;
case AV_PIX_FMT_RGBA64BE:
bytes_per_channel = 2;
pixmax = 0xFFFF;
--
2.52.0
>From 8fff3c592279d3fd72522728e5bed9a4f6c49fe4 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:19:07 +0100
Subject: [PATCH 57/89] avcodec: rv34: add missing fall-through
---
libavcodec/rv34.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c
index f78b91e7df..7f36ccbdf9 100644
--- a/libavcodec/rv34.c
+++ b/libavcodec/rv34.c
@@ -24,6 +24,7 @@
* RV30/40 decoder common data
*/
+#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "libavutil/imgutils.h"
#include "libavutil/internal.h"
@@ -897,6 +898,7 @@ static int rv34_decode_mv(RV34DecContext *r, int block_type)
rv34_mc_1mv (r, block_type, 0, 0, 0, 2, 2, 0);
break;
}
+ av_fallthrough;
case RV34_MB_B_DIRECT:
//surprisingly, it uses motion scheme from next reference frame
/* wait for the current mb row to be finished */
--
2.52.0
>From f8ccac2efa0328d08c470235b2a6f02910e0aeb9 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:19:17 +0100
Subject: [PATCH 58/89] avcodec: rpza: add missing fall-through
---
libavcodec/rpza.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/rpza.c b/libavcodec/rpza.c
index cad2eaad73..81886deb02 100644
--- a/libavcodec/rpza.c
+++ b/libavcodec/rpza.c
@@ -36,6 +36,7 @@
#include <stdint.h>
+#include "libavutil/attributes.h"
#include "libavutil/internal.h"
#include "avcodec.h"
#include "bytestream.h"
@@ -163,6 +164,7 @@ static int rpza_decode_stream(RpzaContext *s)
/* Fill blocks with 4 colors */
case 0xc0:
colorA = bytestream2_get_be16(&s->gb);
+ av_fallthrough;
case 0x20:
colorB = bytestream2_get_be16(&s->gb);
--
2.52.0
>From bb47794a714459c883b2356ad078c326faf767cc Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:19:27 +0100
Subject: [PATCH 59/89] avcodec: psd: add missing fall-through
---
libavcodec/psd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/psd.c b/libavcodec/psd.c
index 426ac40b01..9dc56f8f5e 100644
--- a/libavcodec/psd.c
+++ b/libavcodec/psd.c
@@ -407,6 +407,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture,
break;
case PSD_DUOTONE:
av_log(avctx, AV_LOG_WARNING, "ignoring unknown duotone specification.\n");
+ av_fallthrough;
case PSD_GRAYSCALE:
if (s->layer_count < 0 && s->channel_count >= 2) {
if (s->channel_depth == 8) {
--
2.52.0
>From 938b838570364fb52478d312d432c5ad3a466e6f Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:19:37 +0100
Subject: [PATCH 60/89] avcodec: pafvideo: add missing fall-through
---
libavcodec/pafvideo.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/pafvideo.c b/libavcodec/pafvideo.c
index d8d6db5219..b4376a80b4 100644
--- a/libavcodec/pafvideo.c
+++ b/libavcodec/pafvideo.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/imgutils.h"
#include "libavutil/mem.h"
@@ -246,16 +247,20 @@ static int decode_0(PAFVideoDecContext *c, const uint8_t *pkt, uint8_t code)
switch (code) {
case 2:
offset = 0;
+ av_fallthrough;
case 3:
color = bytestream2_get_byte(&c->gb);
+ av_fallthrough;
case 4:
mask = bytestream2_get_byte(&c->gb);
copy_color_mask(dst + offset, c->width, mask, color);
break;
case 5:
offset = 0;
+ av_fallthrough;
case 6:
set_src_position(c, &src, &send);
+ av_fallthrough;
case 7:
if (src + offset + c->width + 4 > send)
return AVERROR_INVALIDDATA;
--
2.52.0
>From e2ccc12afbcc63a89937090cebe501e46300ec8f Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:19:56 +0100
Subject: [PATCH 61/89] avcodec: mpegaudio: add missing fall-through
---
libavcodec/mpegaudiodec_template.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/mpegaudiodec_template.c b/libavcodec/mpegaudiodec_template.c
index fa2efa023f..420348f4bf 100644
--- a/libavcodec/mpegaudiodec_template.c
+++ b/libavcodec/mpegaudiodec_template.c
@@ -1489,6 +1489,7 @@ static int mp_decode_frame(MPADecodeContext *s, OUT_INT **samples,
break;
case 3:
s->avctx->frame_size = s->lsf ? 576 : 1152;
+ av_fallthrough;
default:
nb_frames = mp_decode_layer3(s);
--
2.52.0
>From 124e38027ee6b28d0a48a3df29b3b1ca0fe0e949 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:20:12 +0100
Subject: [PATCH 62/89] avcodec: microdvddec: add missing fall-through
---
libavcodec/microdvddec.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/microdvddec.c b/libavcodec/microdvddec.c
index a46a62e45f..55e892562c 100644
--- a/libavcodec/microdvddec.c
+++ b/libavcodec/microdvddec.c
@@ -26,6 +26,7 @@
* https://trac.videolan.org/vlc/ticket/1825#comment:6
*/
+#include "libavutil/attributes.h"
#include "libavutil/avstring.h"
#include "libavutil/parseutils.h"
#include "libavutil/bprint.h"
@@ -99,6 +100,7 @@ static char *microdvd_load_tags(struct microdvd_tag *tags, char *s)
/* Style */
case 'Y':
tag.persistent = MICRODVD_PERSISTENT_ON;
+ av_fallthrough;
case 'y':
while (*s && *s != '}' && s - start < 256) {
int style_index = indexof(MICRODVD_STYLES, *s);
@@ -117,6 +119,7 @@ static char *microdvd_load_tags(struct microdvd_tag *tags, char *s)
/* Color */
case 'C':
tag.persistent = MICRODVD_PERSISTENT_ON;
+ av_fallthrough;
case 'c':
while (*s == '$' || *s == '#')
s++;
@@ -129,6 +132,7 @@ static char *microdvd_load_tags(struct microdvd_tag *tags, char *s)
/* Font name */
case 'F':
tag.persistent = MICRODVD_PERSISTENT_ON;
+ av_fallthrough;
case 'f': {
int len = indexof(s, '}');
if (len < 0)
@@ -143,6 +147,7 @@ static char *microdvd_load_tags(struct microdvd_tag *tags, char *s)
/* Font size */
case 'S':
tag.persistent = MICRODVD_PERSISTENT_ON;
+ av_fallthrough;
case 's':
tag.data1 = strtol(s, &s, 10);
if (*s != '}')
--
2.52.0
>From e5aa9cf26f2836e1d7f2c5d4ae2cffbf31741810 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:20:28 +0100
Subject: [PATCH 63/89] avcodec: lcldec: add missing fall-through
---
libavcodec/lcldec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c
index b439dbe25e..ea36d8ebac 100644
--- a/libavcodec/lcldec.c
+++ b/libavcodec/lcldec.c
@@ -42,6 +42,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include "libavutil/attributes.h"
#include "libavutil/mem.h"
#include "libavutil/pixdesc.h"
#include "avcodec.h"
@@ -239,11 +240,13 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
break;
case IMGTYPE_YUV422:
aligned_width &= ~3;
+ av_fallthrough;
case IMGTYPE_YUV211:
bppx2 = 4;
break;
case IMGTYPE_YUV411:
aligned_width &= ~3;
+ av_fallthrough;
case IMGTYPE_YUV420:
bppx2 = 3;
break;
--
2.52.0
>From bb0573a5783f7026412055762454b72bcf823054 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:20:41 +0100
Subject: [PATCH 64/89] avcodec: lagarith: add missing fall-through
---
libavcodec/lagarith.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/lagarith.c b/libavcodec/lagarith.c
index 0969448eda..9a5c8f0e47 100644
--- a/libavcodec/lagarith.c
+++ b/libavcodec/lagarith.c
@@ -27,6 +27,7 @@
#include <inttypes.h>
+#include "libavutil/attributes.h"
#include "libavutil/thread.h"
#include "avcodec.h"
@@ -578,6 +579,7 @@ static int lag_decode_frame(AVCodecContext *avctx, AVFrame *p,
switch (frametype) {
case FRAME_SOLID_RGBA:
avctx->pix_fmt = AV_PIX_FMT_GBRAP;
+ av_fallthrough;
case FRAME_SOLID_GRAY:
if (frametype == FRAME_SOLID_GRAY)
if (avctx->bits_per_coded_sample == 24) {
@@ -627,6 +629,7 @@ static int lag_decode_frame(AVCodecContext *avctx, AVFrame *p,
planes = 4;
offset_ry += 4;
offs[3] = AV_RL32(buf + 9);
+ av_fallthrough;
case FRAME_ARITH_RGB24:
case FRAME_U_RGB24:
if (frametype == FRAME_ARITH_RGB24 || frametype == FRAME_U_RGB24)
--
2.52.0
>From ff0fb685c4da44918ecda57e0f431ad89be04d96 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:20:54 +0100
Subject: [PATCH 65/89] avcodec: jpeglsdec: add missing fall-through
---
libavcodec/jpeglsdec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/jpeglsdec.c b/libavcodec/jpeglsdec.c
index 3c899568ec..bd72830f87 100644
--- a/libavcodec/jpeglsdec.c
+++ b/libavcodec/jpeglsdec.c
@@ -25,6 +25,7 @@
* JPEG-LS decoder.
*/
+#include "libavutil/attributes.h"
#include "libavutil/mem.h"
#include "avcodec.h"
#include "codec_internal.h"
@@ -77,6 +78,7 @@ int ff_jpegls_decode_lse(MJpegDecodeContext *s)
break;
case 2:
s->palette_index = 0;
+ av_fallthrough;
case 3:
tid= bytestream2_get_byte(&s->gB);
wt = bytestream2_get_byte(&s->gB);
--
2.52.0
>From e5b4f2efad0eaf88d4dc83f88a18888a9d4b755e Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:21:06 +0100
Subject: [PATCH 66/89] avcodec: jpeg2000dec: add missing fall-through
---
libavcodec/jpeg2000dec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index 017be6f025..8385a26ed4 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -147,14 +147,17 @@ static int pix_fmt_match(enum AVPixelFormat pix_fmt, int components,
match = match && desc->comp[3].depth >= bpc &&
(log2_chroma_wh >> 14 & 3) == 0 &&
(log2_chroma_wh >> 12 & 3) == 0;
+ av_fallthrough;
case 3:
match = match && desc->comp[2].depth >= bpc &&
(log2_chroma_wh >> 10 & 3) == desc->log2_chroma_w &&
(log2_chroma_wh >> 8 & 3) == desc->log2_chroma_h;
+ av_fallthrough;
case 2:
match = match && desc->comp[1].depth >= bpc &&
(log2_chroma_wh >> 6 & 3) == desc->log2_chroma_w &&
(log2_chroma_wh >> 4 & 3) == desc->log2_chroma_h;
+ av_fallthrough;
case 1:
match = match && desc->comp[0].depth >= bpc &&
--
2.52.0
>From 607691dd001544a6b05057f11fc4fb6e06e29f7a Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:21:14 +0100
Subject: [PATCH 67/89] avcodec: imx: add missing fall-through
---
libavcodec/imx.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/imx.c b/libavcodec/imx.c
index 0f4327ddf7..0f6e7f074c 100644
--- a/libavcodec/imx.c
+++ b/libavcodec/imx.c
@@ -79,6 +79,7 @@ static int imx_decode_frame(AVCodecContext *avctx, AVFrame *rframe,
switch (op) {
case 3:
len = len * 64 + bytestream2_get_byte(&gb);
+ av_fallthrough;
case 0:
while (len > 0) {
x++;
--
2.52.0
>From d7e423369d52ce87f512ce1fc10b7eec01ffaad2 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:21:34 +0100
Subject: [PATCH 68/89] avcodec: h264dec: add missing fall-through
---
libavcodec/h264dec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
index ab31832308..91d95f95b4 100644
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@ -647,6 +647,7 @@ static int decode_nal_units(H264Context *h, AVBufferRef *buf_ref,
}
idr_cleared = 1;
h->has_recovery_point = 1;
+ av_fallthrough;
case H264_NAL_SLICE:
h->has_slice = 1;
--
2.52.0
>From e416cff8d119540e0a76c60ac730eac0279873fd Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:21:53 +0100
Subject: [PATCH 69/89] avcodec: gdv: add missing fall-through
---
libavcodec/gdv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/gdv.c b/libavcodec/gdv.c
index 670597448b..0abf5471ef 100644
--- a/libavcodec/gdv.c
+++ b/libavcodec/gdv.c
@@ -20,6 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/common.h"
#include "libavutil/mem.h"
#include "avcodec.h"
@@ -488,6 +489,7 @@ static int gdv_decode_frame(AVCodecContext *avctx, AVFrame *frame,
switch (compression) {
case 1:
memset(gdv->frame + PREAMBLE_SIZE, 0, gdv->frame_size - PREAMBLE_SIZE);
+ av_fallthrough;
case 0:
for (i = 0; i < 256; i++) {
unsigned r = bytestream2_get_byte(gb);
--
2.52.0
>From b675c097431910c76cce54b3cebb52e7dfc56816 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:22:11 +0100
Subject: [PATCH 70/89] avcodec: flacdsp: add missing fall-throughs
---
libavcodec/flacdsp_lpc_template.c | 60 +++++++++++++++----------------
1 file changed, 30 insertions(+), 30 deletions(-)
diff --git a/libavcodec/flacdsp_lpc_template.c b/libavcodec/flacdsp_lpc_template.c
index dd847d3b32..368527d6ea 100644
--- a/libavcodec/flacdsp_lpc_template.c
+++ b/libavcodec/flacdsp_lpc_template.c
@@ -55,29 +55,29 @@ static av_always_inline void FUNC(lpc_encode_unrolled)(int32_t *res,
sum_type p0 = 0, p1 = 0;
if (big) {
switch (order) {
- case 32: LPC1(32)
- case 31: LPC1(31)
- case 30: LPC1(30)
- case 29: LPC1(29)
- case 28: LPC1(28)
- case 27: LPC1(27)
- case 26: LPC1(26)
- case 25: LPC1(25)
- case 24: LPC1(24)
- case 23: LPC1(23)
- case 22: LPC1(22)
- case 21: LPC1(21)
- case 20: LPC1(20)
- case 19: LPC1(19)
- case 18: LPC1(18)
- case 17: LPC1(17)
- case 16: LPC1(16)
- case 15: LPC1(15)
- case 14: LPC1(14)
- case 13: LPC1(13)
- case 12: LPC1(12)
- case 11: LPC1(11)
- case 10: LPC1(10)
+ case 32: LPC1(32); av_fallthrough;
+ case 31: LPC1(31); av_fallthrough;
+ case 30: LPC1(30); av_fallthrough;
+ case 29: LPC1(29); av_fallthrough;
+ case 28: LPC1(28); av_fallthrough;
+ case 27: LPC1(27); av_fallthrough;
+ case 26: LPC1(26); av_fallthrough;
+ case 25: LPC1(25); av_fallthrough;
+ case 24: LPC1(24); av_fallthrough;
+ case 23: LPC1(23); av_fallthrough;
+ case 22: LPC1(22); av_fallthrough;
+ case 21: LPC1(21); av_fallthrough;
+ case 20: LPC1(20); av_fallthrough;
+ case 19: LPC1(19); av_fallthrough;
+ case 18: LPC1(18); av_fallthrough;
+ case 17: LPC1(17); av_fallthrough;
+ case 16: LPC1(16); av_fallthrough;
+ case 15: LPC1(15); av_fallthrough;
+ case 14: LPC1(14); av_fallthrough;
+ case 13: LPC1(13); av_fallthrough;
+ case 12: LPC1(12); av_fallthrough;
+ case 11: LPC1(11); av_fallthrough;
+ case 10: LPC1(10); av_fallthrough;
case 9: LPC1( 9)
LPC1( 8)
LPC1( 7)
@@ -90,13 +90,13 @@ static av_always_inline void FUNC(lpc_encode_unrolled)(int32_t *res,
}
} else {
switch (order) {
- case 8: LPC1( 8)
- case 7: LPC1( 7)
- case 6: LPC1( 6)
- case 5: LPC1( 5)
- case 4: LPC1( 4)
- case 3: LPC1( 3)
- case 2: LPC1( 2)
+ case 8: LPC1( 8); av_fallthrough;
+ case 7: LPC1( 7); av_fallthrough;
+ case 6: LPC1( 6); av_fallthrough;
+ case 5: LPC1( 5); av_fallthrough;
+ case 4: LPC1( 4); av_fallthrough;
+ case 3: LPC1( 3); av_fallthrough;
+ case 2: LPC1( 2); av_fallthrough;
case 1: LPC1( 1)
}
}
--
2.52.0
>From 88c1ddf239e4fc10e8693e2009124c6af0206404 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:22:26 +0100
Subject: [PATCH 71/89] avcodec: ffv1enc: add missing fall-throughs
---
libavcodec/ffv1enc.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 623bd2a3ea..b665da4444 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -815,6 +815,7 @@ av_cold int ff_ffv1_encode_setup_plane_info(AVCodecContext *avctx,
case AV_PIX_FMT_YUVA420P9:
if (!avctx->bits_per_raw_sample)
s->bits_per_raw_sample = 9;
+ av_fallthrough;
case AV_PIX_FMT_GRAY10:
case AV_PIX_FMT_YUV444P10:
case AV_PIX_FMT_YUV440P10:
@@ -825,6 +826,7 @@ av_cold int ff_ffv1_encode_setup_plane_info(AVCodecContext *avctx,
case AV_PIX_FMT_YUVA420P10:
if (!avctx->bits_per_raw_sample && !s->bits_per_raw_sample)
s->bits_per_raw_sample = 10;
+ av_fallthrough;
case AV_PIX_FMT_GRAY12:
case AV_PIX_FMT_YUV444P12:
case AV_PIX_FMT_YUV440P12:
@@ -834,6 +836,7 @@ av_cold int ff_ffv1_encode_setup_plane_info(AVCodecContext *avctx,
case AV_PIX_FMT_YUVA422P12:
if (!avctx->bits_per_raw_sample && !s->bits_per_raw_sample)
s->bits_per_raw_sample = 12;
+ av_fallthrough;
case AV_PIX_FMT_GRAY14:
case AV_PIX_FMT_YUV444P14:
case AV_PIX_FMT_YUV420P14:
@@ -841,6 +844,7 @@ av_cold int ff_ffv1_encode_setup_plane_info(AVCodecContext *avctx,
if (!avctx->bits_per_raw_sample && !s->bits_per_raw_sample)
s->bits_per_raw_sample = 14;
s->packed_at_lsb = 1;
+ av_fallthrough;
case AV_PIX_FMT_GRAY16:
case AV_PIX_FMT_P016:
case AV_PIX_FMT_P216:
@@ -863,6 +867,7 @@ av_cold int ff_ffv1_encode_setup_plane_info(AVCodecContext *avctx,
return AVERROR_INVALIDDATA;
}
s->version = FFMAX(s->version, 1);
+ av_fallthrough;
case AV_PIX_FMT_GRAY8:
case AV_PIX_FMT_YA8:
case AV_PIX_FMT_NV12:
@@ -914,26 +919,31 @@ av_cold int ff_ffv1_encode_setup_plane_info(AVCodecContext *avctx,
case AV_PIX_FMT_GBRP9:
if (!avctx->bits_per_raw_sample)
s->bits_per_raw_sample = 9;
+ av_fallthrough;
case AV_PIX_FMT_X2BGR10:
case AV_PIX_FMT_X2RGB10:
case AV_PIX_FMT_GBRP10:
case AV_PIX_FMT_GBRAP10:
if (!avctx->bits_per_raw_sample && !s->bits_per_raw_sample)
s->bits_per_raw_sample = 10;
+ av_fallthrough;
case AV_PIX_FMT_GBRP12:
case AV_PIX_FMT_GBRAP12:
if (!avctx->bits_per_raw_sample && !s->bits_per_raw_sample)
s->bits_per_raw_sample = 12;
+ av_fallthrough;
case AV_PIX_FMT_GBRP14:
case AV_PIX_FMT_GBRAP14:
if (!avctx->bits_per_raw_sample && !s->bits_per_raw_sample)
s->bits_per_raw_sample = 14;
+ av_fallthrough;
case AV_PIX_FMT_GBRP16:
case AV_PIX_FMT_GBRAP16:
case AV_PIX_FMT_GBRPF16:
case AV_PIX_FMT_GBRAPF16:
if (!avctx->bits_per_raw_sample && !s->bits_per_raw_sample)
s->bits_per_raw_sample = 16;
+ av_fallthrough;
case AV_PIX_FMT_GBRPF32:
case AV_PIX_FMT_GBRAPF32:
if (!avctx->bits_per_raw_sample && !s->bits_per_raw_sample)
--
2.52.0
>From ee9a84076cb23ff86e0d72ef207a53b5f6b4f07c Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:23:01 +0100
Subject: [PATCH 72/89] avcodec: eatgq: add missing fall-through
---
libavcodec/eatgq.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/eatgq.c b/libavcodec/eatgq.c
index efcad62df1..75d2e677cb 100644
--- a/libavcodec/eatgq.c
+++ b/libavcodec/eatgq.c
@@ -28,6 +28,7 @@
* http://wiki.multimedia.cx/index.php?title=Electronic_Arts_TGQ
*/
+#include "libavutil/attributes.h"
#define BITSTREAM_READER_LE
#include "libavutil/mem_internal.h"
@@ -72,6 +73,7 @@ static int tgq_decode_block(TgqContext *s, int16_t block[64], GetBitContext *gb)
if (i >= 63)
return AVERROR_INVALIDDATA;
block[scantable[i++]] = 0;
+ av_fallthrough;
case 0:
block[scantable[i++]] = 0;
skip_bits(gb, 3);
--
2.52.0
>From 105ea7334a1e66c8eb0436ed729a5efae1b96ad4 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:23:11 +0100
Subject: [PATCH 73/89] avcodec: dxtory: add missing fall-through
---
libavcodec/dxtory.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/dxtory.c b/libavcodec/dxtory.c
index a9b5d835db..1acb7db88c 100644
--- a/libavcodec/dxtory.c
+++ b/libavcodec/dxtory.c
@@ -22,6 +22,7 @@
#include <inttypes.h>
+#include "libavutil/attributes.h"
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
@@ -63,6 +64,7 @@ static void do_vflip(AVCodecContext *avctx, AVFrame *pic, int vflip)
pic->linesize[1] = -pic->linesize[1];
pic->data[2] += (avctx->height - 1) * pic->linesize[2];
pic->linesize[2] = -pic->linesize[2];
+ av_fallthrough;
case AV_PIX_FMT_RGB555LE:
case AV_PIX_FMT_RGB565LE:
case AV_PIX_FMT_BGR24:
--
2.52.0
>From 7bfeafffea33303f73be80042fe7104debe8885c Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:23:22 +0100
Subject: [PATCH 74/89] avcodec: dxa: add missing fall-through
---
libavcodec/dxa.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/dxa.c b/libavcodec/dxa.c
index 5b429781df..39719bc575 100644
--- a/libavcodec/dxa.c
+++ b/libavcodec/dxa.c
@@ -24,6 +24,7 @@
* DXA Video decoder
*/
+#include "libavutil/attributes.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "bytestream.h"
@@ -82,6 +83,7 @@ static int decode_13(AVCodecContext *avctx, DxaDecContext *c, uint8_t* dst,
return AVERROR_INVALIDDATA;
}
tmp2 += x + y*stride;
+ av_fallthrough;
case 0: // skip
case 5: // skip in method 12
for(y = 0; y < 4; y++){
@@ -144,6 +146,7 @@ static int decode_13(AVCodecContext *avctx, DxaDecContext *c, uint8_t* dst,
return AVERROR_INVALIDDATA;
}
tmp2 += x + y*stride;
+ av_fallthrough;
case 0x00: // skip
tmp[d + 0 ] = tmp2[0];
tmp[d + 1 ] = tmp2[1];
--
2.52.0
>From 3d471c8fd302251ec93f4123e4ee86dd71f838c0 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:23:40 +0100
Subject: [PATCH 75/89] avcodec: dv: add missing break
---
libavcodec/dv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/dv.c b/libavcodec/dv.c
index 194d982562..42c184d0b9 100644
--- a/libavcodec/dv.c
+++ b/libavcodec/dv.c
@@ -160,6 +160,7 @@ static inline void dv_calc_mb_coordinates(const AVDVProfile *d, int chan,
tbl[m] = (x << 2) | (y << 8);
break;
}
+ break;
default:
break;
}
--
2.52.0
>From 42e9d6e725e9f05f26fadd1282e4455183f515d9 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:23:55 +0100
Subject: [PATCH 76/89] avcodec: dpxenc: add missing fall-through
---
libavcodec/dpxenc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/dpxenc.c b/libavcodec/dpxenc.c
index e136c7a249..68e7fece12 100644
--- a/libavcodec/dpxenc.c
+++ b/libavcodec/dpxenc.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/imgutils.h"
@@ -226,6 +227,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
break;
default:
av_log(avctx, AV_LOG_WARNING, "unsupported color transfer\n");
+ av_fallthrough;
case AVCOL_TRC_UNSPECIFIED:
color_trc = DPX_TRC_UNSPECIFIED_VIDEO;
break;
@@ -247,6 +249,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
break;
default:
av_log(avctx, AV_LOG_WARNING, "unsupported colorimetric specification\n");
+ av_fallthrough;
case AVCOL_PRI_UNSPECIFIED:
color_spec = DPX_COL_SPEC_UNSPECIFIED_VIDEO;
break;
--
2.52.0
>From 463a59af010f4488edb9e98b81e85468879eca78 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:24:07 +0100
Subject: [PATCH 77/89] avcodec: dds: add missing fall-throughs
---
libavcodec/dds.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/libavcodec/dds.c b/libavcodec/dds.c
index bd16b41e49..4bbe8c88c9 100644
--- a/libavcodec/dds.c
+++ b/libavcodec/dds.c
@@ -28,6 +28,7 @@
#include <stdint.h>
+#include "libavutil/attributes.h"
#include "libavutil/libm.h"
#include "libavutil/imgutils.h"
@@ -267,6 +268,7 @@ static int parse_pixel_format(AVCodecContext *avctx)
break;
case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:
avctx->colorspace = AVCOL_SPC_RGB;
+ av_fallthrough;
case DXGI_FORMAT_R8G8B8A8_TYPELESS:
case DXGI_FORMAT_R8G8B8A8_UNORM:
case DXGI_FORMAT_R8G8B8A8_UINT:
@@ -276,12 +278,14 @@ static int parse_pixel_format(AVCodecContext *avctx)
break;
case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB:
avctx->colorspace = AVCOL_SPC_RGB;
+ av_fallthrough;
case DXGI_FORMAT_B8G8R8A8_TYPELESS:
case DXGI_FORMAT_B8G8R8A8_UNORM:
avctx->pix_fmt = AV_PIX_FMT_RGBA;
break;
case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB:
avctx->colorspace = AVCOL_SPC_RGB;
+ av_fallthrough;
case DXGI_FORMAT_B8G8R8X8_TYPELESS:
case DXGI_FORMAT_B8G8R8X8_UNORM:
avctx->pix_fmt = AV_PIX_FMT_RGBA; // opaque
@@ -292,6 +296,7 @@ static int parse_pixel_format(AVCodecContext *avctx)
/* Texture types. */
case DXGI_FORMAT_BC1_UNORM_SRGB:
avctx->colorspace = AVCOL_SPC_RGB;
+ av_fallthrough;
case DXGI_FORMAT_BC1_TYPELESS:
case DXGI_FORMAT_BC1_UNORM:
ctx->dec.tex_ratio = 8;
@@ -299,6 +304,7 @@ static int parse_pixel_format(AVCodecContext *avctx)
break;
case DXGI_FORMAT_BC2_UNORM_SRGB:
avctx->colorspace = AVCOL_SPC_RGB;
+ av_fallthrough;
case DXGI_FORMAT_BC2_TYPELESS:
case DXGI_FORMAT_BC2_UNORM:
ctx->dec.tex_ratio = 16;
@@ -306,6 +312,7 @@ static int parse_pixel_format(AVCodecContext *avctx)
break;
case DXGI_FORMAT_BC3_UNORM_SRGB:
avctx->colorspace = AVCOL_SPC_RGB;
+ av_fallthrough;
case DXGI_FORMAT_BC3_TYPELESS:
case DXGI_FORMAT_BC3_UNORM:
ctx->dec.tex_ratio = 16;
--
2.52.0
>From 5de003790bdbc96d15099bc6bfedbe67cdeddfca Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:24:27 +0100
Subject: [PATCH 78/89] avcodec: dca: add missing break
---
libavcodec/dca_parser.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/dca_parser.c b/libavcodec/dca_parser.c
index aaf4f42221..b7e2add698 100644
--- a/libavcodec/dca_parser.c
+++ b/libavcodec/dca_parser.c
@@ -218,6 +218,7 @@ static int dca_parse_params(DCAParseContext *pc1, const uint8_t *buf,
switch (get_bits(&gb, 8)) {
case DCA_LBR_HEADER_DECODER_INIT:
pc1->sr_code = get_bits(&gb, 8);
+ break;
case DCA_LBR_HEADER_SYNC_ONLY:
break;
default:
--
2.52.0
>From fb685ecd667a93c50b41a729fec3ce1b0a27571f Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:24:46 +0100
Subject: [PATCH 79/89] avcodec: cavs: add missing fall-through
---
libavcodec/cavs.h | 2 ++
libavcodec/cavsdec.c | 1 +
2 files changed, 3 insertions(+)
diff --git a/libavcodec/cavs.h b/libavcodec/cavs.h
index d3a88ca403..f5c2929c7e 100644
--- a/libavcodec/cavs.h
+++ b/libavcodec/cavs.h
@@ -25,6 +25,7 @@
#include <stddef.h>
#include <stdint.h>
+#include "libavutil/attributes.h"
#include "libavutil/frame.h"
#include "libavutil/mem_internal.h"
@@ -257,6 +258,7 @@ static inline void set_mvs(cavs_vector *mv, enum cavs_block size) {
case BLK_16X16:
mv[MV_STRIDE ] = mv[0];
mv[MV_STRIDE+1] = mv[0];
+ av_fallthrough;
case BLK_16X8:
mv[1] = mv[0];
break;
diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c
index fffe0657f9..cc26a904db 100644
--- a/libavcodec/cavsdec.c
+++ b/libavcodec/cavsdec.c
@@ -1280,6 +1280,7 @@ static int cavs_decode_frame(AVCodecContext *avctx, AVFrame *rframe,
av_frame_unref(h->DPB[1].f);
h->got_keyframe = 1;
}
+ av_fallthrough;
case PIC_PB_START_CODE:
if (frame_start > 1)
return AVERROR_INVALIDDATA;
--
2.52.0
>From 0344a8062e9f8cece0a228b8b92464ff007779cd Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:25:17 +0100
Subject: [PATCH 80/89] avcodec: c39: add missing fall-through
---
libavcodec/c93.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/c93.c b/libavcodec/c93.c
index 288b1f0ea7..da103bec40 100644
--- a/libavcodec/c93.c
+++ b/libavcodec/c93.c
@@ -23,6 +23,7 @@
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"
+#include "libavutil/attributes.h"
typedef struct C93DecoderContext {
AVFrame *pictures[2];
@@ -174,6 +175,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe,
case C93_4X4_FROM_CURR:
copy_from = newpic->data[0];
+ av_fallthrough;
case C93_4X4_FROM_PREV:
for (int j = 0; j < 8; j += 4) {
for (i = 0; i < 8; i += 4) {
--
2.52.0
>From 68a22c781952c702e3c90313c00ac5529edc651b Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:25:28 +0100
Subject: [PATCH 81/89] avcodec: bintext: add missing fall-through
---
libavcodec/bintext.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/bintext.c b/libavcodec/bintext.c
index 356042c1f0..4a83907d68 100644
--- a/libavcodec/bintext.c
+++ b/libavcodec/bintext.c
@@ -30,6 +30,7 @@
#include "config_components.h"
+#include "libavutil/attributes.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/xga_font_data.h"
#include "avcodec.h"
@@ -92,6 +93,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
default:
av_log(avctx, AV_LOG_WARNING, "font height %i not supported\n", s->font_height);
s->font_height = 8;
+ av_fallthrough;
case 8:
s->font = avpriv_cga_font_get();
break;
--
2.52.0
>From 61a60f6ec28fcb1182245af12a6f56978b90ed20 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:25:38 +0100
Subject: [PATCH 82/89] avcodec: bink: add missing fall-through
---
libavcodec/bink.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/bink.c b/libavcodec/bink.c
index e5300be000..e10c8e0966 100644
--- a/libavcodec/bink.c
+++ b/libavcodec/bink.c
@@ -672,6 +672,7 @@ static int read_dct_coeffs(BinkContext *c, GetBitContext *gb, int32_t block[64],
case 0:
coef_list[list_pos] = ccoef + 4;
mode_list[list_pos] = 1;
+ av_fallthrough;
case 2:
if (mode == 2) {
coef_list[list_pos] = 0;
@@ -792,6 +793,7 @@ static int read_residue(GetBitContext *gb, int16_t block[64], int masks_count)
case 0:
coef_list[list_pos] = ccoef + 4;
mode_list[list_pos] = 1;
+ av_fallthrough;
case 2:
if (mode == 2) {
coef_list[list_pos] = 0;
--
2.52.0
>From 40401b329894813a5d5bea5b180a9d8546ad5bb8 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:25:51 +0100
Subject: [PATCH 83/89] avcodec: bethsoftvideo: add missing fall-through
---
libavcodec/bethsoftvideo.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/bethsoftvideo.c b/libavcodec/bethsoftvideo.c
index c06eaba32a..3e59a33481 100644
--- a/libavcodec/bethsoftvideo.c
+++ b/libavcodec/bethsoftvideo.c
@@ -27,6 +27,7 @@
* @see http://www.svatopluk.com/andux/docs/dfvid.html
*/
+#include "libavutil/attributes.h"
#include "libavutil/common.h"
#include "avcodec.h"
#include "bethsoftvideo.h"
@@ -113,6 +114,7 @@ static int bethsoftvid_decode_frame(AVCodecContext *avctx, AVFrame *rframe,
if(yoffset >= avctx->height)
return AVERROR_INVALIDDATA;
dst += vid->frame->linesize[0] * yoffset;
+ av_fallthrough;
case VIDEO_P_FRAME:
case VIDEO_I_FRAME:
break;
--
2.52.0
>From f4a001f7ae2ac7d5ba07b1eb99f2a6852997357e Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:26:01 +0100
Subject: [PATCH 84/89] avcodec: avs: add missing fall-through
---
libavcodec/avs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/avs.c b/libavcodec/avs.c
index b53175f640..42fc99cb56 100644
--- a/libavcodec/avs.c
+++ b/libavcodec/avs.c
@@ -23,6 +23,7 @@
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.h"
+#include "libavutil/attributes.h"
typedef struct AvsContext {
AVFrame *frame;
@@ -98,6 +99,7 @@ static int avs_decode_frame(AVCodecContext * avctx, AVFrame *picture,
case AVS_I_FRAME:
p->pict_type = AV_PICTURE_TYPE_I;
p->flags |= AV_FRAME_FLAG_KEY;
+ av_fallthrough;
case AVS_P_FRAME_3X3:
vect_w = 3;
vect_h = 3;
--
2.52.0
>From 5c05f4e3c7098be79433deef9ffa1e53792243a8 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:26:12 +0100
Subject: [PATCH 85/89] avcodec: argo: add missing fall-throughs
---
libavcodec/argo.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/argo.c b/libavcodec/argo.c
index b2e9f3bb18..3b0d4fca0f 100644
--- a/libavcodec/argo.c
+++ b/libavcodec/argo.c
@@ -634,24 +634,28 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe,
ret = decode_avcf(avctx, frame);
break;
}
+ av_fallthrough;
case MKBETAG('A', 'L', 'C', 'D'):
if (avctx->pix_fmt == AV_PIX_FMT_PAL8) {
s->key = 0;
ret = decode_alcd(avctx, frame);
break;
}
+ av_fallthrough;
case MKBETAG('R', 'L', 'E', 'F'):
if (avctx->pix_fmt == AV_PIX_FMT_PAL8) {
s->key = 1;
ret = decode_rle(avctx, frame);
break;
}
+ av_fallthrough;
case MKBETAG('R', 'L', 'E', 'D'):
if (avctx->pix_fmt == AV_PIX_FMT_PAL8) {
s->key = 0;
ret = decode_rle(avctx, frame);
break;
}
+ av_fallthrough;
default:
av_log(avctx, AV_LOG_DEBUG, "unknown chunk 0x%X\n", chunk);
break;
--
2.52.0
>From fd460e96c716a47242b795591503f803ebb078d4 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:26:22 +0100
Subject: [PATCH 86/89] avcodec: ansi: add missing fall-through
---
libavcodec/ansi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/ansi.c b/libavcodec/ansi.c
index bde9edbe60..4ff015e2c0 100644
--- a/libavcodec/ansi.c
+++ b/libavcodec/ansi.c
@@ -24,6 +24,7 @@
* ASCII/ANSI art decoder
*/
+#include "libavutil/attributes.h"
#include "libavutil/common.h"
#include "libavutil/frame.h"
#include "libavutil/xga_font_data.h"
@@ -396,6 +397,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe,
break;
case 0x0A: //LF
hscroll(avctx);
+ av_fallthrough;
case 0x0D: //CR
s->x = 0;
break;
--
2.52.0
>From 7e1677bf7f8bdda1c90c3ddb94b1af068755caca Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:26:40 +0100
Subject: [PATCH 87/89] avcodec: ac3dec: add missing fall-throughs
---
libavcodec/ac3dec.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 2f0e7f5344..6f7306ea59 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -31,6 +31,7 @@
#include <math.h>
#include <string.h>
+#include "libavutil/attributes.h"
#include "libavutil/channel_layout.h"
#include "libavutil/crc.h"
#include "libavutil/downmix_info.h"
@@ -338,7 +339,9 @@ static int decode_exponents(AC3DecodeContext *s,
switch (group_size) {
case 4: dexps[j++] = prevexp;
dexps[j++] = prevexp;
+ av_fallthrough;
case 2: dexps[j++] = prevexp;
+ av_fallthrough;
case 1: dexps[j++] = prevexp;
}
}
@@ -614,13 +617,16 @@ static void ac3_upmix_delay(AC3DecodeContext *s)
break;
case AC3_CHMODE_2F2R:
memset(s->delay[3], 0, channel_data_size);
+ av_fallthrough;
case AC3_CHMODE_2F1R:
memset(s->delay[2], 0, channel_data_size);
break;
case AC3_CHMODE_3F2R:
memset(s->delay[4], 0, channel_data_size);
+ av_fallthrough;
case AC3_CHMODE_3F1R:
memset(s->delay[3], 0, channel_data_size);
+ av_fallthrough;
case AC3_CHMODE_3F:
memcpy(s->delay[2], s->delay[1], channel_data_size);
memset(s->delay[1], 0, channel_data_size);
--
2.52.0
>From e068c6f6e325cf2f8f6b68ca02d0cfc7d382af35 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:27:03 +0100
Subject: [PATCH 88/89] avcodec: aac: add missing fall-through
---
libavcodec/aac/aacdec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/aac/aacdec.c b/libavcodec/aac/aacdec.c
index b8d53036d4..9cd3e713b5 100644
--- a/libavcodec/aac/aacdec.c
+++ b/libavcodec/aac/aacdec.c
@@ -1946,6 +1946,7 @@ static int decode_extension_payload(AACDecContext *ac, GetBitContext *gb, int cn
switch (type) { // extension type
case EXT_SBR_DATA_CRC:
crc_flag++;
+ av_fallthrough;
case EXT_SBR_DATA:
if (!che) {
av_log(ac->avctx, AV_LOG_ERROR, "SBR was found before the first channel element.\n");
--
2.52.0
>From e290401a07ea83246291f026e6fffe75e7b5efdc Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Wed, 18 Feb 2026 00:28:50 +0100
Subject: [PATCH 89/89] configure: add implicit-fallthrough to extra warnings
---
configure | 1 +
1 file changed, 1 insertion(+)
diff --git a/configure b/configure
index da93aaf661..6d64f89dd3 100755
--- a/configure
+++ b/configure
@@ -7837,6 +7837,7 @@ if enabled extra_warnings; then
check_allcflags -Wcast-qual
check_allcflags -Wextra
check_allcflags -Wpedantic
+ check_allcflags -Wimplicit-fallthrough
fi
check_disable_warning(){
--
2.52.0
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
reply other threads:[~2026-02-17 23:50 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=177137216661.25.16069620993230191060@29965ddac10e \
--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