diff options
author | William Wilgus <wilgus.william@gmail.com> | 2024-12-25 01:27:52 -0500 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2024-12-25 01:27:52 -0500 |
commit | 4fe6ce91ec6a596a2eb1a1186bb450502b4ef39e (patch) | |
tree | 34f1be06257a89a8a6c1d358b316644cbdff8048 | |
parent | 6bec4597bf8e8672f6d0d530cb1207f89d143afc (diff) | |
download | rockbox-4fe6ce91ec.tar.gz rockbox-4fe6ce91ec.zip |
skin_tokens.c use static mp3entry if over 2k
Change-Id: I5c1130673d2caf1198aa65c2b84bc7102f768c3d
-rw-r--r-- | apps/gui/skin_engine/skin_tokens.c | 8 |
1 files changed, 7 insertions, 1 deletions
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) |