summaryrefslogtreecommitdiff
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
parentd7ad24ed39de98286715708a3e91519f292c89db (diff)
downloadrockbox-ef26cd2af12acc608da44e25740d838c69677b96.tar.gz
rockbox-ef26cd2af12acc608da44e25740d838c69677b96.zip
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
-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)
1108 lseek(fd, sub_chunk_len - 8, SEEK_CUR); /* FIXME not 8 */ 1108 lseek(fd, sub_chunk_len - 8, SEEK_CUR); /* FIXME not 8 */
1109 size_remaining-=sub_chunk_len; 1109 size_remaining-=sub_chunk_len;
1110 1110
1111 /* Process mdia */ 1111 /* Process mdia - skipping possible edts */
1112 n=read_uint32be(fd,&sub_chunk_len); 1112 n=read_uint32be(fd,&sub_chunk_len);
1113 n=read(fd,&sub_chunk_id,4); 1113 n=read(fd,&sub_chunk_id,4);
1114 if (memcmp(&sub_chunk_id,"edts",4)==0) {
1115 lseek(fd, sub_chunk_len - 8, SEEK_CUR); /* FIXME not 8 */
1116 size_remaining-=sub_chunk_len;
1117 n=read_uint32be(fd,&sub_chunk_len);
1118 n=read(fd,&sub_chunk_id,4);
1119 }
1120
1114 if (memcmp(&sub_chunk_id,"mdia",4)!=0) { 1121 if (memcmp(&sub_chunk_id,"mdia",4)!=0) {
1115 logf("Expecting mdia\n"); 1122 logf("Expecting mdia\n");
1116 return false; 1123 return false;