summaryrefslogtreecommitdiffstats
path: root/apps/buffering.c
diff options
context:
space:
mode:
authorNicolas Pennequin <nicolas.pennequin@free.fr>2008-04-16 16:18:05 +0000
committerNicolas Pennequin <nicolas.pennequin@free.fr>2008-04-16 16:18:05 +0000
commitde026dcedefec81b585a7e00a06712273d57ea64 (patch)
tree415805e588cf36f08c94078209fd5fafcf16be69 /apps/buffering.c
parent689020f68976feb63220e1938922203a2de66b6b (diff)
downloadrockbox-de026dcedefec81b585a7e00a06712273d57ea64.tar.gz
rockbox-de026dcedefec81b585a7e00a06712273d57ea64.tar.bz2
rockbox-de026dcedefec81b585a7e00a06712273d57ea64.zip
Fix FS#8902 (NSF files get skipped). The cause was too strict metadata checking (the NSF metadata parser doesn't fill the 'length' field). Hopefully there won't be any problems with that anymore.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17142 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/buffering.c')
-rw-r--r--apps/buffering.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/buffering.c b/apps/buffering.c
index 113650fe9f..9dafa673b0 100644
--- a/apps/buffering.c
+++ b/apps/buffering.c
@@ -589,7 +589,11 @@ static bool buffer_handle(int handle_id)
if (h->type == TYPE_ID3)
{
- get_metadata((struct mp3entry *)(buffer + h->data), h->fd, h->path);
+ if (!get_metadata((struct mp3entry *)(buffer + h->data), h->fd, h->path))
+ {
+ /* metadata parsing failed: clear the buffer. */
+ memset(buffer + h->data, 0, sizeof(struct mp3entry));
+ }
close(h->fd);
h->fd = -1;
h->filerem = 0;