Reordered operations to optimise file seeking
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1202 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1b53042f27
commit
1575ee378c
1 changed files with 6 additions and 7 deletions
|
@ -28,6 +28,7 @@
|
|||
#include <errno.h>
|
||||
#include <stdbool.h>
|
||||
#include "file.h"
|
||||
#include "debug.h"
|
||||
|
||||
#include "id3.h"
|
||||
|
||||
|
@ -489,21 +490,19 @@ mp3info(struct mp3entry *entry, char *filename)
|
|||
|
||||
memset(entry, 0, sizeof(struct mp3entry));
|
||||
|
||||
entry->path = filename;
|
||||
|
||||
entry->filesize = getfilesize(fd);
|
||||
entry->id3v2len = getid3v2len(fd);
|
||||
entry->id3v1len = getid3v1len(fd);
|
||||
entry->length = getsonglength(fd, entry);
|
||||
entry->title = NULL;
|
||||
|
||||
|
||||
entry->id3v2len = getid3v2len(fd);
|
||||
if(HASID3V2(entry))
|
||||
setid3v2title(fd, entry);
|
||||
entry->length = getsonglength(fd, entry);
|
||||
|
||||
entry->id3v1len = getid3v1len(fd);
|
||||
if(HASID3V1(entry) && !entry->title)
|
||||
setid3v1title(fd, entry);
|
||||
|
||||
entry->filesize = getfilesize(fd);
|
||||
|
||||
close(fd);
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue