diff options
author | Dave Chapman <dave@dchapman.com> | 2005-09-24 11:40:26 +0000 |
---|---|---|
committer | Dave Chapman <dave@dchapman.com> | 2005-09-24 11:40:26 +0000 |
commit | ef26cd2af12acc608da44e25740d838c69677b96 (patch) | |
tree | 1719ef316f3895c6e78bd662cbd4135cb2f2e111 /apps | |
parent | d7ad24ed39de98286715708a3e91519f292c89db (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.c | 9 |
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; |