From 18ea2d87153bfcf386905b7c36b425d8e7bcc592 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 22 Aug 2021 23:08:36 +0200 Subject: [PATCH] mp4: Use automatic numbering for atom enum. 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 | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/mp4.c b/mp4.c index b17c8171..e2512db1 100644 --- 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 }; -- 2.39.5