]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
mp4: Assorted trivial cleanups.
authorAndre Noll <maan@tuebingen.mpg.de>
Sat, 28 Aug 2021 14:40:19 +0000 (16:40 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 27 Jun 2022 14:45:56 +0000 (16:45 +0200)
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
mp4.h

diff --git a/mp4.c b/mp4.c
index e98a24e26615f07a22e83d1343d75b56aca85253..e60f18f59b1adc26350ae25055df7c822f6f174c 100644 (file)
--- 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 d685287fa555cad19f608b04147cd5323fe6fb15..a46b4029b7469c968e0faf0875aeabe27bca573d 100644 (file)
--- 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 */