From ab834d33dc78cfe7dfdee3c01c1f35e4641cc014 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 9 Aug 2021 20:39:05 +0200 Subject: [PATCH] mp4: Remove always true condition in mp4ff_parse_tag(). The parentheses are redundant, and "done" can never be true here. --- mp4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mp4.c b/mp4.c index fc743271..b2a4795d 100644 --- a/mp4.c +++ b/mp4.c @@ -1003,7 +1003,7 @@ static int32_t mp4ff_parse_tag(mp4ff_t * f, const uint8_t parent_atom_type, done = 1; } } else if (parent_atom_type == ATOM_TRACK || parent_atom_type == ATOM_DISC) { - if (!done && (subsize - header_size) >= (sizeof (char) + sizeof (uint8_t) * 3 + sizeof (uint32_t) + /* version + flags + reserved */ + if (subsize - header_size >= (sizeof (char) + sizeof (uint8_t) * 3 + sizeof (uint32_t) + /* version + flags + reserved */ +(parent_atom_type == ATOM_TRACK ? sizeof (uint16_t) : 0) /* leading uint16_t if ATOM_TRACK */ +sizeof (uint16_t) /* track / disc */ +sizeof (uint16_t)) /* totaltracks / totaldiscs */) { -- 2.39.5