From 1182720326e0392271fa66fe582d5c2be108877b Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 28 Aug 2021 16:40:19 +0200 Subject: [PATCH] mp4: Assorted trivial cleanups. Avoid C++ comments, use int rather than int32_t as the standard return type, kill a pointless cast and use plain unsigned rather than uint32_t for the number of tag items. --- mp4.c | 8 ++++---- mp4.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mp4.c b/mp4.c index e98a24e2..e60f18f5 100644 --- a/mp4.c +++ b/mp4.c @@ -420,7 +420,7 @@ static int read_mdhd(struct mp4 *f) ret = read_int64(f, &t->duration); if (ret <= 0) return ret; - } else { //version == 0 + } else { /* version == 0 */ uint32_t temp; skip_bytes(f, 8); /* creation time (4), modification time (4) */ @@ -437,7 +437,7 @@ static int read_mdhd(struct mp4 *f) return 1; } -static int32_t read_ilst(struct mp4 *f, int32_t size) +static int read_ilst(struct mp4 *f, int32_t size) { int ret; uint64_t sumsize = 0; @@ -466,7 +466,7 @@ static int32_t read_ilst(struct mp4 *f, int32_t size) return 1; } -static int32_t read_meta(struct mp4 *f, uint64_t size) +static int read_meta(struct mp4 *f, uint64_t size) { int ret; uint64_t subsize, sumsize = 0; @@ -796,7 +796,7 @@ static void *modify_moov(struct mp4 *f, uint32_t *out_size) { int ret; uint64_t total_base = f->moov_offset + 8; - uint32_t total_size = (uint32_t) (f->moov_size - 8); + uint32_t total_size = f->moov_size - 8; uint32_t new_ilst_size = 0; void *out_buffer; uint8_t *p_out; diff --git a/mp4.h b/mp4.h index d685287f..a46b4029 100644 --- a/mp4.h +++ b/mp4.h @@ -13,7 +13,7 @@ struct mp4_tag { struct mp4_metadata { struct mp4_tag *tags; - uint32_t count; + unsigned count; }; struct mp4; /* opaque */ -- 2.39.5