From 372ad33d35d299b77437124198f02aca8d83ae3f Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Tue, 18 Mar 2003 00:45:27 +0000 Subject: Faster ID3 parsing with the new filesize() function git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3474 a1c6a512-1295-4272-9138-f99709370657 --- firmware/id3.c | 14 +------------- 1 file changed, 1 insertion(+), 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) return offset; } -static int getfilesize(int fd) -{ - int size; - - /* seek to the end of it */ - size = lseek(fd, 0, SEEK_END); - if(-1 == size) - return 0; /* unknown */ - - return size; -} - /* * Calculates the length (in milliseconds) of an MP3 file. * @@ -529,7 +517,7 @@ bool mp3info(struct mp3entry *entry, char *filename) strncpy(entry->path, filename, sizeof(entry->path)); entry->title = NULL; - entry->filesize = getfilesize(fd); + entry->filesize = filesize(fd); entry->id3v2len = getid3v2len(fd); entry->tracknum = 0; entry->genre = 0xff; -- cgit v1.2.3