From cc12c978b4ad5ed927747fbc7e4cf3289b9da15b Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Fri, 20 Aug 2021 13:33:17 +0200 Subject: [PATCH] mp4: Remove two local unused header_size variables. The header size is an optional pointer argument of atom_read_header(), i.e., callers may pass NULL if they aren't interested in the atom header size. --- mp4.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mp4.c b/mp4.c index 1d04b2c4..2ca4ed8a 100644 --- a/mp4.c +++ b/mp4.c @@ -551,7 +551,6 @@ static int read_mp4a(struct mp4 *f) int ret; int32_t i; uint8_t atom_type = 0; - uint8_t header_size = 0; struct mp4_track *t; if (f->total_tracks == 0) @@ -590,14 +589,13 @@ static int read_mp4a(struct mp4 *f) ret = read_int16(f, NULL); if (ret <= 0) return ret; - return atom_read_header(f, &atom_type, &header_size, NULL); + return atom_read_header(f, &atom_type, NULL, NULL); } static int read_stsd(struct mp4 *f) { int ret; uint32_t i, entry_count; - uint8_t header_size = 0; struct mp4_track *t; if (f->total_tracks == 0) @@ -616,7 +614,7 @@ static int read_stsd(struct mp4 *f) uint64_t skip = get_position(f); uint64_t size; uint8_t atom_type = 0; - ret = atom_read_header(f, &atom_type, &header_size, &size); + ret = atom_read_header(f, &atom_type, NULL, &size); if (ret <= 0) return ret; skip += size; -- 2.39.5