summaryrefslogtreecommitdiff
path: root/firmware/id3.c
diff options
context:
space:
mode:
authorThom Johansen <thomj@rockbox.org>2007-09-19 10:40:55 +0000
committerThom Johansen <thomj@rockbox.org>2007-09-19 10:40:55 +0000
commit294ec1d110178f30894721d5cda14c246333954d (patch)
tree2e31dc287557007939b3b5abf4493fa02946b6c5 /firmware/id3.c
parent547cffb90bffacc7f22e6661c61ccad830ce2c91 (diff)
Remove the ID3 tag version priority setting on the grounds of it being pretty pointless. ID3v2 tags are superior to ID3v1 tags, and needs less seeking around to find.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14750 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/id3.c')
-rw-r--r--firmware/id3.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/firmware/id3.c b/firmware/id3.c
index 2fd7894de8..a3d6297c14 100644
--- a/firmware/id3.c
+++ b/firmware/id3.c
@@ -1164,10 +1164,8 @@ static int getsonglength(int fd, struct mp3entry *entry)
* about an MP3 file and updates it's entry accordingly.
*
Note, that this returns true for successful, false for error! */
-bool get_mp3_metadata(int fd, struct mp3entry *entry, const char *filename, bool v1first)
+bool get_mp3_metadata(int fd, struct mp3entry *entry, const char *filename)
{
- int v1found = false;
-
#if CONFIG_CODEC != SWCODEC
memset(entry, 0, sizeof(struct mp3entry));
#endif
@@ -1180,10 +1178,7 @@ bool get_mp3_metadata(int fd, struct mp3entry *entry, const char *filename, bool
entry->tracknum = 0;
entry->discnum = 0;
- if(v1first)
- v1found = setid3v1title(fd, entry);
-
- if (!v1found && entry->id3v2len)
+ if (entry->id3v2len)
setid3v2title(fd, entry);
int len = getsonglength(fd, entry);
if (len < 0)
@@ -1194,9 +1189,8 @@ bool get_mp3_metadata(int fd, struct mp3entry *entry, const char *filename, bool
the true size of the MP3 stream */
entry->filesize -= entry->first_frame_offset;
- /* only seek to end of file if no id3v2 tags were found,
- and we already haven't looked for a v1 tag */
- if (!v1first && !entry->id3v2len) {
+ /* only seek to end of file if no id3v2 tags were found */
+ if (!entry->id3v2len) {
setid3v1title(fd, entry);
}
@@ -1209,7 +1203,7 @@ bool get_mp3_metadata(int fd, struct mp3entry *entry, const char *filename, bool
}
/* Note, that this returns false for successful, true for error! */
-bool mp3info(struct mp3entry *entry, const char *filename, bool v1first)
+bool mp3info(struct mp3entry *entry, const char *filename)
{
int fd;
bool result;
@@ -1218,7 +1212,7 @@ bool mp3info(struct mp3entry *entry, const char *filename, bool v1first)
if (fd < 0)
return true;
- result = !get_mp3_metadata(fd, entry, filename, v1first);
+ result = !get_mp3_metadata(fd, entry, filename);
close(fd);