SDL_image: Allow .avif extension

From 9a1fe5fa98869d61687c60e3072d8d2b5abd7071 Mon Sep 17 00:00:00 2001
From: Sugargenix LLC <[EMAIL REDACTED]>
Date: Thu, 27 Aug 2026 14:09:14 -0700
Subject: [PATCH] Allow .avif extension

---
 src/IMG_anim_decoder.c | 2 +-
 src/IMG_anim_encoder.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/IMG_anim_decoder.c b/src/IMG_anim_decoder.c
index 73225edaa..c410e8631 100644
--- a/src/IMG_anim_decoder.c
+++ b/src/IMG_anim_decoder.c
@@ -212,7 +212,7 @@ IMG_AnimationDecoder *IMG_CreateAnimationDecoderWithProperties(SDL_PropertiesID
         result = IMG_CreateANIAnimationDecoder(decoder, props);
     } else if (SDL_strcasecmp(type, "apng") == 0 || SDL_strcasecmp(type, "png") == 0) {
         result = IMG_CreateAPNGAnimationDecoder(decoder, props);
-    } else if (SDL_strcasecmp(type, "avifs") == 0) {
+    } else if (SDL_strcasecmp(type, "avifs") == 0 || SDL_strcasecmp(type, "avif") == 0) {
         result = IMG_CreateAVIFAnimationDecoder(decoder, props);
     } else if (SDL_strcasecmp(type, "gif") == 0) {
         result = IMG_CreateGIFAnimationDecoder(decoder, props);
diff --git a/src/IMG_anim_encoder.c b/src/IMG_anim_encoder.c
index 1e73db06b..3dde779ac 100644
--- a/src/IMG_anim_encoder.c
+++ b/src/IMG_anim_encoder.c
@@ -140,7 +140,7 @@ IMG_AnimationEncoder *IMG_CreateAnimationEncoderWithProperties(SDL_PropertiesID
         result = IMG_CreateANIAnimationEncoder(encoder, props);
     } else if (SDL_strcasecmp(type, "apng") == 0 || SDL_strcasecmp(type, "png") == 0) {
         result = IMG_CreateAPNGAnimationEncoder(encoder, props);
-    } else if (SDL_strcasecmp(type, "avifs") == 0) {
+    } else if (SDL_strcasecmp(type, "avifs") == 0 || SDL_strcasecmp(type, "avif") == 0) {
         result = IMG_CreateAVIFAnimationEncoder(encoder, props);
     } else if (SDL_strcasecmp(type, "gif") == 0) {
         result = IMG_CreateGIFAnimationEncoder(encoder, props);