From 4fe6ce91ec6a596a2eb1a1186bb450502b4ef39e Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Wed, 25 Dec 2024 01:27:52 -0500 Subject: [PATCH] skin_tokens.c use static mp3entry if over 2k Change-Id: I5c1130673d2caf1198aa65c2b84bc7102f768c3d --- apps/gui/skin_engine/skin_tokens.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c index c9e755e21f..c34a34a991 100644 --- a/apps/gui/skin_engine/skin_tokens.c +++ b/apps/gui/skin_engine/skin_tokens.c @@ -591,7 +591,13 @@ static const char * NOINLINE try_id3_token(struct wps_token *token, int offset, char *filename = NULL; int numeric_ret = -1; const char *numeric_buf = buf; - struct mp3entry tempid3, *id3;/* Note: struct mp3entry is huge */ + +#ifdef sizeof(mp3entry) <= 2048 + struct mp3entry tempid3, *id3; +#else + static struct mp3entry tempid3, *id3; +#endif + id3 = get_mp3entry_from_offset(token->next? 1: offset, &tempid3, &filename); if (token->type == SKIN_TOKEN_REPLAYGAIN)