From ef26cd2af12acc608da44e25740d838c69677b96 Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Sat, 24 Sep 2005 11:40:26 +0000 Subject: 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 --- apps/metadata.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'apps') 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; -- cgit v1.2.3