summaryrefslogtreecommitdiff
path: root/apps/tagcache.c
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2024-09-11 22:36:42 -0400
committerWilliam Wilgus <me.theuser@yahoo.com>2024-09-12 19:16:02 -0400
commit79bed1f422a79a18e40443b9ada647aeb1c0cc61 (patch)
treef9fe9e18e54c379bc67ded5e9569d43e799c580f /apps/tagcache.c
parent2a0f3c8276c397b384ffa8b57fa62f38f3cea6a9 (diff)
downloadrockbox-79bed1f422a79a18e40443b9ada647aeb1c0cc61.tar.gz
rockbox-79bed1f422a79a18e40443b9ada647aeb1c0cc61.zip
RFC skin_tokens remove a static buffer
it was hard to hit this branch, I had to comment out: ln 555 else if (offset == 1) ln 556 pid3 = state->nid3; as far as I can tell the reason for the separate filename buffer was due to the failure mode of audio_peek_track() wiping the id3->path, stands to reason for me that we can just fill it again -Already found a gotcha playlist_peek() mutates the buffer makes me like this solution less, might rework tagcache_fill_tags() instead --Fixed Change-Id: I4a2ee71a8e2d0739c9e141948b71c2ed36296e3b
Diffstat (limited to 'apps/tagcache.c')
-rw-r--r--apps/tagcache.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c
index 1412647368..5bfeb82481 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -2085,13 +2085,18 @@ bool tagcache_fill_tags(struct mp3entry *id3, const char *filename)
2085 return false; 2085 return false;
2086 2086
2087 /* Find the corresponding entry in tagcache. */ 2087 /* Find the corresponding entry in tagcache. */
2088
2089 if (filename != NULL)
2090 memset(id3, 0, sizeof(struct mp3entry));
2091 else /* Note: caller clears id3 prior to call */
2092 filename = id3->path;
2093
2088 idx_id = find_entry_ram(filename); 2094 idx_id = find_entry_ram(filename);
2089 if (idx_id < 0) 2095 if (idx_id < 0)
2090 return false; 2096 return false;
2091 2097
2092 entry = &tcramcache.hdr->indices[idx_id]; 2098 entry = &tcramcache.hdr->indices[idx_id];
2093 2099
2094 memset(id3, 0, sizeof(struct mp3entry));
2095 char* buf = id3->id3v2buf; 2100 char* buf = id3->id3v2buf;
2096 ssize_t remaining = sizeof(id3->id3v2buf); 2101 ssize_t remaining = sizeof(id3->id3v2buf);
2097 2102