summaryrefslogtreecommitdiff
path: root/apps/metadata/mp4.c
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2009-05-15 22:45:03 +0000
committerDave Chapman <dave@dchapman.com>2009-05-15 22:45:03 +0000
commitda3dc455f66959f816d914c078e55d061a6b82d4 (patch)
tree8c2c0bcbfbe99ea26996072f1fad1d8eb4cd7871 /apps/metadata/mp4.c
parenta96ce3ba52812a093d6d369322f961c3024ee207 (diff)
downloadrockbox-da3dc455f66959f816d914c078e55d061a6b82d4.tar.gz
rockbox-da3dc455f66959f816d914c078e55d061a6b82d4.zip
Change the type of read_uint32be to uint32_t and ensure all variables passed to that function are also of that type. No functional changes, but makes read_uint32be consistent with the other read_* functions and prevents warning in the upcoming RealAudio metadata parser.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20950 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/metadata/mp4.c')
-rw-r--r--apps/metadata/mp4.c39
1 files changed, 19 insertions, 20 deletions
diff --git a/apps/metadata/mp4.c b/apps/metadata/mp4.c
index b6aeaf1581..af2a301e73 100644
--- a/apps/metadata/mp4.c
+++ b/apps/metadata/mp4.c
@@ -130,8 +130,8 @@ static unsigned int read_mp4_tag_string(int fd, int size_left, char** buffer,
130 return length; 130 return length;
131} 131}
132 132
133static unsigned int read_mp4_atom(int fd, unsigned int* size, 133static unsigned int read_mp4_atom(int fd, uint32_t* size,
134 unsigned int* type, unsigned int size_left) 134 uint32_t* type, uint32_t size_left)
135{ 135{
136 read_uint32be(fd, size); 136 read_uint32be(fd, size);
137 read_uint32be(fd, type); 137 read_uint32be(fd, type);
@@ -168,7 +168,7 @@ static unsigned int read_mp4_atom(int fd, unsigned int* size,
168 return size_left; 168 return size_left;
169} 169}
170 170
171static unsigned int read_mp4_length(int fd, unsigned int* size) 171static unsigned int read_mp4_length(int fd, uint32_t* size)
172{ 172{
173 unsigned int length = 0; 173 unsigned int length = 0;
174 int bytes = 0; 174 int bytes = 0;
@@ -186,8 +186,7 @@ static unsigned int read_mp4_length(int fd, unsigned int* size)
186 return length; 186 return length;
187} 187}
188 188
189static bool read_mp4_esds(int fd, struct mp3entry* id3, 189static bool read_mp4_esds(int fd, struct mp3entry* id3, uint32_t* size)
190 unsigned int* size)
191{ 190{
192 unsigned char buf[8]; 191 unsigned char buf[8];
193 bool sbr = false; 192 bool sbr = false;
@@ -349,10 +348,10 @@ static bool read_mp4_esds(int fd, struct mp3entry* id3,
349} 348}
350 349
351static bool read_mp4_tags(int fd, struct mp3entry* id3, 350static bool read_mp4_tags(int fd, struct mp3entry* id3,
352 unsigned int size_left) 351 uint32_t size_left)
353{ 352{
354 unsigned int size; 353 uint32_t size;
355 unsigned int type; 354 uint32_t type;
356 unsigned int buffer_left = sizeof(id3->id3v2buf) + sizeof(id3->id3v1buf); 355 unsigned int buffer_left = sizeof(id3->id3v2buf) + sizeof(id3->id3v1buf);
357 char* buffer = id3->id3v2buf; 356 char* buffer = id3->id3v2buf;
358 bool cwrt = false; 357 bool cwrt = false;
@@ -456,7 +455,7 @@ static bool read_mp4_tags(int fd, struct mp3entry* id3,
456 case MP4_extra: 455 case MP4_extra:
457 { 456 {
458 char tag_name[TAG_NAME_LENGTH]; 457 char tag_name[TAG_NAME_LENGTH];
459 unsigned int sub_size; 458 uint32_t sub_size;
460 459
461 /* "mean" atom */ 460 /* "mean" atom */
462 read_uint32be(fd, &sub_size); 461 read_uint32be(fd, &sub_size);
@@ -543,11 +542,11 @@ static bool read_mp4_tags(int fd, struct mp3entry* id3,
543} 542}
544 543
545static bool read_mp4_container(int fd, struct mp3entry* id3, 544static bool read_mp4_container(int fd, struct mp3entry* id3,
546 unsigned int size_left) 545 uint32_t size_left)
547{ 546{
548 unsigned int size; 547 uint32_t size;
549 unsigned int type; 548 uint32_t type;
550 unsigned int handler = 0; 549 uint32_t handler = 0;
551 bool rc = true; 550 bool rc = true;
552 551
553 do 552 do
@@ -562,7 +561,7 @@ static bool read_mp4_container(int fd, struct mp3entry* id3,
562 { 561 {
563 case MP4_ftyp: 562 case MP4_ftyp:
564 { 563 {
565 unsigned int id; 564 uint32_t id;
566 565
567 read_uint32be(fd, &id); 566 read_uint32be(fd, &id);
568 size -= 4; 567 size -= 4;
@@ -625,7 +624,7 @@ static bool read_mp4_container(int fd, struct mp3entry* id3,
625 624
626 case MP4_stts: 625 case MP4_stts:
627 { 626 {
628 unsigned int entries; 627 uint32_t entries;
629 unsigned int i; 628 unsigned int i;
630 629
631 lseek(fd, 4, SEEK_CUR); 630 lseek(fd, 4, SEEK_CUR);
@@ -634,8 +633,8 @@ static bool read_mp4_container(int fd, struct mp3entry* id3,
634 633
635 for (i = 0; i < entries; i++) 634 for (i = 0; i < entries; i++)
636 { 635 {
637 unsigned int n; 636 uint32_t n;
638 unsigned int l; 637 uint32_t l;
639 638
640 read_uint32be(fd, &n); 639 read_uint32be(fd, &n);
641 read_uint32be(fd, &l); 640 read_uint32be(fd, &l);
@@ -649,7 +648,7 @@ static bool read_mp4_container(int fd, struct mp3entry* id3,
649 case MP4_mp4a: 648 case MP4_mp4a:
650 case MP4_alac: 649 case MP4_alac:
651 { 650 {
652 unsigned int frequency; 651 uint32_t frequency;
653 652
654 id3->codectype = (type == MP4_mp4a) ? AFMT_AAC : AFMT_ALAC; 653 id3->codectype = (type == MP4_mp4a) ? AFMT_AAC : AFMT_ALAC;
655 lseek(fd, 22, SEEK_CUR); 654 lseek(fd, 22, SEEK_CUR);
@@ -659,8 +658,8 @@ static bool read_mp4_container(int fd, struct mp3entry* id3,
659 658
660 if (type == MP4_mp4a) 659 if (type == MP4_mp4a)
661 { 660 {
662 unsigned int subsize; 661 uint32_t subsize;
663 unsigned int subtype; 662 uint32_t subtype;
664 663
665 /* Get frequency from the decoder info tag, if possible. */ 664 /* Get frequency from the decoder info tag, if possible. */
666 lseek(fd, 2, SEEK_CUR); 665 lseek(fd, 2, SEEK_CUR);