1
0
Fork 0
forked from len0rd/rockbox

skin_tokens.c use static mp3entry if over 2k

Change-Id: I5c1130673d2caf1198aa65c2b84bc7102f768c3d
This commit is contained in:
William Wilgus 2024-12-25 01:27:52 -05:00
parent 6bec4597bf
commit 4fe6ce91ec

View file

@ -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)