summaryrefslogtreecommitdiff
path: root/firmware/id3.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/id3.c')
-rw-r--r--firmware/id3.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/firmware/id3.c b/firmware/id3.c
index b761f50b86..2f933b6b6d 100644
--- a/firmware/id3.c
+++ b/firmware/id3.c
@@ -431,18 +431,6 @@ static int getid3v2len(int fd)
431 return offset; 431 return offset;
432} 432}
433 433
434static int getfilesize(int fd)
435{
436 int size;
437
438 /* seek to the end of it */
439 size = lseek(fd, 0, SEEK_END);
440 if(-1 == size)
441 return 0; /* unknown */
442
443 return size;
444}
445
446/* 434/*
447 * Calculates the length (in milliseconds) of an MP3 file. 435 * Calculates the length (in milliseconds) of an MP3 file.
448 * 436 *
@@ -529,7 +517,7 @@ bool mp3info(struct mp3entry *entry, char *filename)
529 strncpy(entry->path, filename, sizeof(entry->path)); 517 strncpy(entry->path, filename, sizeof(entry->path));
530 518
531 entry->title = NULL; 519 entry->title = NULL;
532 entry->filesize = getfilesize(fd); 520 entry->filesize = filesize(fd);
533 entry->id3v2len = getid3v2len(fd); 521 entry->id3v2len = getid3v2len(fd);
534 entry->tracknum = 0; 522 entry->tracknum = 0;
535 entry->genre = 0xff; 523 entry->genre = 0xff;