diff options
author | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2008-04-16 16:18:05 +0000 |
---|---|---|
committer | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2008-04-16 16:18:05 +0000 |
commit | de026dcedefec81b585a7e00a06712273d57ea64 (patch) | |
tree | 415805e588cf36f08c94078209fd5fafcf16be69 /apps/buffering.c | |
parent | 689020f68976feb63220e1938922203a2de66b6b (diff) |
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.c | 6 |
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; |