diff options
-rw-r--r-- | apps/SOURCES | 1 | ||||
-rw-r--r-- | apps/metadata.c | 12 | ||||
-rw-r--r-- | apps/metadata/metadata_parsers.h | 2 | ||||
-rw-r--r-- | docs/CREDITS | 1 |
4 files changed, 6 insertions, 10 deletions
diff --git a/apps/SOURCES b/apps/SOURCES index 143d9d50ea..0408c32583 100644 --- a/apps/SOURCES +++ b/apps/SOURCES | |||
@@ -172,6 +172,7 @@ metadata/wavpack.c | |||
172 | metadata/a52.c | 172 | metadata/a52.c |
173 | metadata/asap.c | 173 | metadata/asap.c |
174 | metadata/rm.c | 174 | metadata/rm.c |
175 | metadata/nsf.c | ||
175 | #endif | 176 | #endif |
176 | #ifdef HAVE_TAGCACHE | 177 | #ifdef HAVE_TAGCACHE |
177 | tagcache.c | 178 | tagcache.c |
diff --git a/apps/metadata.c b/apps/metadata.c index 400ce6f469..56ab6c16e6 100644 --- a/apps/metadata.c +++ b/apps/metadata.c | |||
@@ -215,10 +215,6 @@ bool mp3info(struct mp3entry *entry, const char *filename) | |||
215 | */ | 215 | */ |
216 | bool get_metadata(struct mp3entry* id3, int fd, const char* trackname) | 216 | bool get_metadata(struct mp3entry* id3, int fd, const char* trackname) |
217 | { | 217 | { |
218 | #if CONFIG_CODEC == SWCODEC | ||
219 | unsigned char* buf; | ||
220 | #endif | ||
221 | |||
222 | /* Clear the mp3entry to avoid having bogus pointers appear */ | 218 | /* Clear the mp3entry to avoid having bogus pointers appear */ |
223 | memset(id3, 0, sizeof(struct mp3entry)); | 219 | memset(id3, 0, sizeof(struct mp3entry)); |
224 | 220 | ||
@@ -356,15 +352,11 @@ bool get_metadata(struct mp3entry* id3, int fd, const char* trackname) | |||
356 | break; | 352 | break; |
357 | 353 | ||
358 | case AFMT_NSF: | 354 | case AFMT_NSF: |
359 | buf = (unsigned char *)id3->path; | 355 | if (!get_nsf_metadata(fd, id3)) |
360 | if ((lseek(fd, 0, SEEK_SET) < 0) || ((read(fd, buf, 8)) < 8)) | ||
361 | { | 356 | { |
362 | DEBUGF("lseek or read failed\n"); | 357 | DEBUGF("get_nsf_metadata error\n"); |
363 | return false; | 358 | return false; |
364 | } | 359 | } |
365 | id3->vbr = false; | ||
366 | id3->filesize = filesize(fd); | ||
367 | if (memcmp(buf,"NESM",4) && memcmp(buf,"NSFE",4)) return false; | ||
368 | break; | 360 | break; |
369 | 361 | ||
370 | case AFMT_AIFF: | 362 | case AFMT_AIFF: |
diff --git a/apps/metadata/metadata_parsers.h b/apps/metadata/metadata_parsers.h index 0464071777..20a71c90b9 100644 --- a/apps/metadata/metadata_parsers.h +++ b/apps/metadata/metadata_parsers.h | |||
@@ -39,3 +39,5 @@ bool get_a52_metadata(int fd, struct mp3entry* id3); | |||
39 | bool get_asf_metadata(int fd, struct mp3entry* id3); | 39 | bool get_asf_metadata(int fd, struct mp3entry* id3); |
40 | bool get_asap_metadata(int fd, struct mp3entry* id3); | 40 | bool get_asap_metadata(int fd, struct mp3entry* id3); |
41 | bool get_rm_metadata(int fd, struct mp3entry* id3); | 41 | bool get_rm_metadata(int fd, struct mp3entry* id3); |
42 | bool get_nsf_metadata(int fd, struct mp3entry* id3); | ||
43 | |||
diff --git a/docs/CREDITS b/docs/CREDITS index 3a7cc84d4e..bd92cae474 100644 --- a/docs/CREDITS +++ b/docs/CREDITS | |||
@@ -489,6 +489,7 @@ Rosso Maltese | |||
489 | Amaury Pouly | 489 | Amaury Pouly |
490 | Laurent Papier | 490 | Laurent Papier |
491 | Johannes Boy | 491 | Johannes Boy |
492 | Jason Yu | ||
492 | 493 | ||
493 | The libmad team | 494 | The libmad team |
494 | The wavpack team | 495 | The wavpack team |