forked from len0rd/rockbox
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
This commit is contained in:
parent
689020f689
commit
de026dcede
2 changed files with 6 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1709,7 +1709,7 @@ static void audio_finish_load_track(void)
|
|||
else
|
||||
track_id3 = bufgetid3(tracks[track_widx].id3_hid);
|
||||
|
||||
if (track_id3->length == 0 || track_id3->filesize == 0)
|
||||
if (track_id3->length == 0 && track_id3->filesize == 0)
|
||||
{
|
||||
logf("audio_finish_load_track: invalid metadata");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue