summaryrefslogtreecommitdiff
path: root/lib/rbcodec/metadata/mp4.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbcodec/metadata/mp4.c')
-rw-r--r--lib/rbcodec/metadata/mp4.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/lib/rbcodec/metadata/mp4.c b/lib/rbcodec/metadata/mp4.c
index 1540e93738..e05a588e7e 100644
--- a/lib/rbcodec/metadata/mp4.c
+++ b/lib/rbcodec/metadata/mp4.c
@@ -57,10 +57,6 @@
57#define MP4_gnre FOURCC('g', 'n', 'r', 'e') 57#define MP4_gnre FOURCC('g', 'n', 'r', 'e')
58#define MP4_hdlr FOURCC('h', 'd', 'l', 'r') 58#define MP4_hdlr FOURCC('h', 'd', 'l', 'r')
59#define MP4_ilst FOURCC('i', 'l', 's', 't') 59#define MP4_ilst FOURCC('i', 'l', 's', 't')
60#define MP4_isom FOURCC('i', 's', 'o', 'm')
61#define MP4_M4A FOURCC('M', '4', 'A', ' ')
62#define MP4_m4a FOURCC('m', '4', 'a', ' ') /*technically its "M4A "*/
63#define MP4_M4B FOURCC('M', '4', 'B', ' ') /*but files exist with lower case*/
64#define MP4_mdat FOURCC('m', 'd', 'a', 't') 60#define MP4_mdat FOURCC('m', 'd', 'a', 't')
65#define MP4_mdia FOURCC('m', 'd', 'i', 'a') 61#define MP4_mdia FOURCC('m', 'd', 'i', 'a')
66#define MP4_mdir FOURCC('m', 'd', 'i', 'r') 62#define MP4_mdir FOURCC('m', 'd', 'i', 'r')
@@ -68,8 +64,6 @@
68#define MP4_minf FOURCC('m', 'i', 'n', 'f') 64#define MP4_minf FOURCC('m', 'i', 'n', 'f')
69#define MP4_moov FOURCC('m', 'o', 'o', 'v') 65#define MP4_moov FOURCC('m', 'o', 'o', 'v')
70#define MP4_mp4a FOURCC('m', 'p', '4', 'a') 66#define MP4_mp4a FOURCC('m', 'p', '4', 'a')
71#define MP4_mp42 FOURCC('m', 'p', '4', '2')
72#define MP4_qt FOURCC('q', 't', ' ', ' ')
73#define MP4_soun FOURCC('s', 'o', 'u', 'n') 67#define MP4_soun FOURCC('s', 'o', 'u', 'n')
74#define MP4_stbl FOURCC('s', 't', 'b', 'l') 68#define MP4_stbl FOURCC('s', 't', 'b', 'l')
75#define MP4_stsd FOURCC('s', 't', 's', 'd') 69#define MP4_stsd FOURCC('s', 't', 's', 'd')
@@ -618,20 +612,11 @@ static bool read_mp4_container(int fd, struct mp3entry* id3,
618 { 612 {
619 case MP4_ftyp: 613 case MP4_ftyp:
620 { 614 {
621 uint32_t id; 615 // filetype (supported ignore case values: m4a, m4b, mp42, 3gp6, qt, isom)
622 616 char filetype[4];
623 read_uint32be(fd, &id); 617 read(fd, &filetype, 4);
618 DEBUGF("MP4 file type: '%.4s'\n", filetype);
624 size -= 4; 619 size -= 4;
625
626 if ((id != MP4_M4A) && (id != MP4_M4B) && (id != MP4_mp42)
627 && (id != MP4_qt) && (id != MP4_3gp6) && (id != MP4_m4a)
628 && (id != MP4_isom))
629 {
630 DEBUGF("Unknown MP4 file type: '%c%c%c%c'\n",
631 (int)(id >> 24 & 0xff), (int)(id >> 16 & 0xff),
632 (int)(id >> 8 & 0xff), (int)(id & 0xff));
633 return false;
634 }
635 } 620 }
636 break; 621 break;
637 622