summaryrefslogtreecommitdiffstats
path: root/apps/gui/skin_engine/skin_tokens.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-02-10 10:26:07 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-02-10 10:26:07 +0000
commitedfff8a5efb1bca75f8b49c3ad3dd151653d39c8 (patch)
tree88d2c99f09f107489f67250403aa7e9c1ccdb26f /apps/gui/skin_engine/skin_tokens.c
parent6f9d2ad130701ec6b54ed90885c6972dbef79d27 (diff)
downloadrockbox-edfff8a5efb1bca75f8b49c3ad3dd151653d39c8.tar.gz
rockbox-edfff8a5efb1bca75f8b49c3ad3dd151653d39c8.zip
audio_peek_track should copy the struct mp3entry instead of pointing directly into the buffer. Despite the dire warning, caller does in fact yield/sleep and its usage is too nonlocalized to control that reliably.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29275 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine/skin_tokens.c')
-rw-r--r--apps/gui/skin_engine/skin_tokens.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c
index ddc2221ce6..f455999b2a 100644
--- a/apps/gui/skin_engine/skin_tokens.c
+++ b/apps/gui/skin_engine/skin_tokens.c
@@ -563,17 +563,15 @@ static struct mp3entry* get_mp3entry_from_offset(int offset, char **filename)
fname = playlist_peek(offset, filename_buf, sizeof(filename_buf));
*filename = (char*)fname;
#if CONFIG_CODEC == SWCODEC
-#if defined(HAVE_TC_RAMCACHE) && defined(HAVE_DIRCACHE)
static struct mp3entry tempid3;
- if (tagcache_fill_tags(&tempid3, fname))
- {
- pid3 = &tempid3;
- }
- else
+ if (
+#if defined(HAVE_TC_RAMCACHE) && defined(HAVE_DIRCACHE)
+ tagcache_fill_tags(&tempid3, fname) ||
#endif
+ audio_peek_track(&tempid3, offset)
+ )
{
- if (!audio_peek_track(&pid3, offset))
- pid3 = NULL;
+ pid3 = &tempid3;
}
#endif
}