summaryrefslogtreecommitdiff
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)
563 fname = playlist_peek(offset, filename_buf, sizeof(filename_buf)); 563 fname = playlist_peek(offset, filename_buf, sizeof(filename_buf));
564 *filename = (char*)fname; 564 *filename = (char*)fname;
565#if CONFIG_CODEC == SWCODEC 565#if CONFIG_CODEC == SWCODEC
566#if defined(HAVE_TC_RAMCACHE) && defined(HAVE_DIRCACHE)
567 static struct mp3entry tempid3; 566 static struct mp3entry tempid3;
568 if (tagcache_fill_tags(&tempid3, fname)) 567 if (
569 { 568#if defined(HAVE_TC_RAMCACHE) && defined(HAVE_DIRCACHE)
570 pid3 = &tempid3; 569 tagcache_fill_tags(&tempid3, fname) ||
571 }
572 else
573#endif 570#endif
571 audio_peek_track(&tempid3, offset)
572 )
574 { 573 {
575 if (!audio_peek_track(&pid3, offset)) 574 pid3 = &tempid3;
576 pid3 = NULL;
577 } 575 }
578#endif 576#endif
579 } 577 }