]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
mp4: Use automatic numbering for atom enum.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 22 Aug 2021 21:08:36 +0000 (23:08 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 30 May 2022 19:37:36 +0000 (21:37 +0200)
The exact numbers numbers of the ATOM enum are irrelevant. The only
thing which matters is the distinction between atoms we are only
interested in because they contain subatoms we care about and atoms
for which there is a corresponding read_xxx() parser.

mp4.c

diff --git a/mp4.c b/mp4.c
index b17c8171bf476f4f068d395499296e48ff84dbf9..e2512db17de21c0fd20286860a0e6861f9542b2d 100644 (file)
--- a/mp4.c
+++ b/mp4.c
@@ -145,31 +145,31 @@ static bool atom_compare(int8_t a1, int8_t b1, int8_t c1, int8_t d1,
 
 enum atoms {
        /* atoms with subatoms */
-       ATOM_MOOV = 1,
-       ATOM_TRAK = 2,
-       ATOM_MDIA = 4,
-       ATOM_MINF = 5,
-       ATOM_STBL = 6,
-       ATOM_UDTA = 7,
-       ATOM_ILST = 8, /* iTunes Metadata list */
-       ATOM_TITLE = 9,
-       ATOM_ARTIST = 10,
-       ATOM_ALBUM = 12,
-       ATOM_DATE = 13,
-       ATOM_COMMENT = 15,
+       ATOM_MOOV,
+       ATOM_TRAK,
+       ATOM_MDIA,
+       ATOM_MINF,
+       ATOM_STBL,
+       ATOM_UDTA,
+       ATOM_ILST, /* iTunes Metadata list */
+       ATOM_TITLE,
+       ATOM_ARTIST,
+       ATOM_ALBUM,
+       ATOM_DATE,
+       ATOM_COMMENT,
 
        SUBATOMIC = 128,
 
        /* atoms without subatoms */
-       ATOM_MDHD = 134, /* track header */
-       ATOM_STSD = 138, /* sample description box */
-       ATOM_STTS = 139, /* time to sample box */
-       ATOM_STSZ = 140, /* sample size box */
-       ATOM_STCO = 142, /* chunk offset box */
-       ATOM_STSC = 143, /* sample to chunk box */
-       ATOM_MP4A = 144,
-       ATOM_META = 148, /* iTunes Metadata box */
-       ATOM_DATA = 150, /* iTunes Metadata data box */
+       ATOM_MDHD, /* track header */
+       ATOM_STSD, /* sample description box */
+       ATOM_STTS, /* time to sample box */
+       ATOM_STSZ, /* sample size box */
+       ATOM_STCO, /* chunk offset box */
+       ATOM_STSC, /* sample to chunk box */
+       ATOM_MP4A,
+       ATOM_META, /* iTunes Metadata box */
+       ATOM_DATA, /* iTunes Metadata data box */
        ATOM_UNKNOWN = 255
 };