From c12bd32682d1f49e3d65f7b5eeb9cd03a90dcdcd Mon Sep 17 00:00:00 2001 From: tarsin Date: Sun, 19 Mar 2023 00:32:10 +0800 Subject: [PATCH] Allow decode avif --- app/src/main/cpp/archive.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/cpp/archive.c b/app/src/main/cpp/archive.c index a5500eaf2..a1fa6f026 100644 --- a/app/src/main/cpp/archive.c +++ b/app/src/main/cpp/archive.c @@ -71,7 +71,7 @@ static size_t archiveSize = 0; static entry *entries = NULL; static size_t entryCount = 0; -const char supportExt[9][6] = { +const char supportExt[10][6] = { "jpeg", "jpg", "png", @@ -80,7 +80,8 @@ const char supportExt[9][6] = { "bmp", "ico", "wbmp", - "heif" + "heif", + "avif" }; static inline int filename_is_playable_file(const char *name) { @@ -88,7 +89,7 @@ static inline int filename_is_playable_file(const char *name) { if (!dotptr++) return false; int i; - for (i = 0; i < 9; i++) + for (i = 0; i < 10; i++) if (strcmp(dotptr, supportExt[i]) == 0) return true; return false;