diff options
| author | Linus Nielsen Feltzing <linus@haxx.se> | 2002-09-19 09:03:16 +0000 |
|---|---|---|
| committer | Linus Nielsen Feltzing <linus@haxx.se> | 2002-09-19 09:03:16 +0000 |
| commit | 2c6393737189055076481d2e5e503237ef8bf41a (patch) | |
| tree | 167df842bdbe7b8c10c77a02e733b401c7be8fd2 | |
| parent | c3eb83c6956672e4e639e66fba6f97acbcacd591 (diff) | |
| download | rockbox-2c6393737189055076481d2e5e503237ef8bf41a.zip rockbox-2c6393737189055076481d2e5e503237ef8bf41a.tar.gz rockbox-2c6393737189055076481d2e5e503237ef8bf41a.tar.bz2 rockbox-2c6393737189055076481d2e5e503237ef8bf41a.tar.xz | |
Better handling of tagless tracks with VBR headers
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2333 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | firmware/id3.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/firmware/id3.c b/firmware/id3.c index c7d8f76..a440661 100644 --- a/firmware/id3.c +++ b/firmware/id3.c @@ -402,6 +402,7 @@ static int getsonglength(int fd, struct mp3entry *entry) int chmode; int bytecount; int bittable; /* which bitrate table to use */ + bool header_found = false; long bpf; long tpf; @@ -585,6 +586,8 @@ static int getsonglength(int fd, struct mp3entry *entry) /* Make sure we skip this frame in playback */ bytecount += bpf; + + header_found = true; } /* Is it a LAME Info frame? */ @@ -595,6 +598,8 @@ static int getsonglength(int fd, struct mp3entry *entry) { /* Make sure we skip this frame in playback */ bytecount += bpf; + + header_found = true; } @@ -613,7 +618,7 @@ static int getsonglength(int fd, struct mp3entry *entry) DEBUGF("Old ID3V2 length: %x\n", entry->id3v2len); /* Adjust the tag length only if there is a tag present */ - if(entry->id3v2len) + if(entry->id3v2len || header_found) entry->id3v2len = bytecount; DEBUGF("New ID3V2 length: %x\n", bytecount); |