]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
mp4: Simplify atom_read_header().
authorAndre Noll <maan@tuebingen.mpg.de>
Thu, 26 Aug 2021 17:05:28 +0000 (19:05 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 6 Jun 2022 14:30:15 +0000 (16:30 +0200)
All callers pass non-NULL pointers for the atom size, so the condition
which is removed in this commit is always true.

mp4.c

diff --git a/mp4.c b/mp4.c
index 3963f7830fcb67e9eb2a8ec0aa7cab43779f9693..dbe2cf1c5f24d2846b4adb31e45c5fed396fc125 100644 (file)
--- a/mp4.c
+++ b/mp4.c
@@ -188,8 +188,7 @@ static int atom_read_header(struct mp4 *f, uint8_t *atom_type,
        } else {
                if (header_size)
                        *header_size = 8;
-               if (atom_size)
-                       *atom_size = size;
+               *atom_size = size;
        }
        *atom_type = atom_name_to_type(atom_header + 4);
        return 1;