Index: apps/metadata/metadata_parsers.h =================================================================== --- apps/metadata/metadata_parsers.h (revision 22553) +++ apps/metadata/metadata_parsers.h (working copy) @@ -39,3 +39,5 @@ bool get_asf_metadata(int fd, struct mp3entry* id3); bool get_asap_metadata(int fd, struct mp3entry* id3); bool get_rm_metadata(int fd, struct mp3entry* id3); +bool get_nsf_metadata(int fd, struct mp3entry* id3); + Index: apps/metadata.c =================================================================== --- apps/metadata.c (revision 22553) +++ apps/metadata.c (working copy) @@ -215,10 +215,6 @@ */ bool get_metadata(struct mp3entry* id3, int fd, const char* trackname) { -#if CONFIG_CODEC == SWCODEC - unsigned char* buf; -#endif - /* Clear the mp3entry to avoid having bogus pointers appear */ memset(id3, 0, sizeof(struct mp3entry)); @@ -356,15 +352,11 @@ break; case AFMT_NSF: - buf = (unsigned char *)id3->path; - if ((lseek(fd, 0, SEEK_SET) < 0) || ((read(fd, buf, 8)) < 8)) + if (!get_nsf_metadata(fd, id3)) { - DEBUGF("lseek or read failed\n"); + DEBUGF("get_nsf_metadata error\n"); return false; } - id3->vbr = false; - id3->filesize = filesize(fd); - if (memcmp(buf,"NESM",4) && memcmp(buf,"NSFE",4)) return false; break; case AFMT_AIFF: Index: apps/SOURCES =================================================================== --- apps/SOURCES (revision 22553) +++ apps/SOURCES (working copy) @@ -172,6 +172,7 @@ metadata/a52.c metadata/asap.c metadata/rm.c +metadata/nsf.c #endif #ifdef HAVE_TAGCACHE tagcache.c