summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2005-09-24 11:40:26 +0000
committerDave Chapman <dave@dchapman.com>2005-09-24 11:40:26 +0000
commitef26cd2af12acc608da44e25740d838c69677b96 (patch)
tree1719ef316f3895c6e78bd662cbd4135cb2f2e111 /apps
parentd7ad24ed39de98286715708a3e91519f292c89db (diff)
Deal with new "edts" tag in iTunes 5 encoded files - this fixes metadata reading and seeking in new ALAC files
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7555 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/metadata.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/metadata.c b/apps/metadata.c
index 2772a41f92..33ec296c35 100644
--- a/apps/metadata.c
+++ b/apps/metadata.c
@@ -1108,9 +1108,16 @@ static bool get_alac_metadata(int fd, struct mp3entry* id3)
lseek(fd, sub_chunk_len - 8, SEEK_CUR); /* FIXME not 8 */
size_remaining-=sub_chunk_len;
- /* Process mdia */
+ /* Process mdia - skipping possible edts */
n=read_uint32be(fd,&sub_chunk_len);
n=read(fd,&sub_chunk_id,4);
+ if (memcmp(&sub_chunk_id,"edts",4)==0) {
+ lseek(fd, sub_chunk_len - 8, SEEK_CUR); /* FIXME not 8 */
+ size_remaining-=sub_chunk_len;
+ n=read_uint32be(fd,&sub_chunk_len);
+ n=read(fd,&sub_chunk_id,4);
+ }
+
if (memcmp(&sub_chunk_id,"mdia",4)!=0) {
logf("Expecting mdia\n");
return false;