From 13273bf45126e8254dabce13bbdcfdfc396868ef Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Thu, 19 Aug 2021 19:13:31 +0200 Subject: [PATCH] mp4: Convert "meta_only" to a boolean. Several functions receive the "meta_only" parameter to distinguish between regular and metadata-only opens. The parameter can only be zero or one, so use a boolean because true/false is more descriptive than 1/0. --- mp4.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mp4.c b/mp4.c index 469ec7d7..e5ec9dd1 100644 --- a/mp4.c +++ b/mp4.c @@ -865,7 +865,7 @@ static int atom_read(struct mp4 *f, uint64_t size, uint8_t atom_type) } /* parse atoms that are sub atoms of other atoms */ -static int parse_sub_atoms(struct mp4 *f, uint64_t total_size, int meta_only) +static int parse_sub_atoms(struct mp4 *f, uint64_t total_size, bool meta_only) { int ret; uint64_t size; @@ -903,7 +903,7 @@ static int parse_sub_atoms(struct mp4 *f, uint64_t total_size, int meta_only) return 1; } -static int parse_root_atoms(struct mp4 *f, int meta_only) +static int parse_root_atoms(struct mp4 *f, bool meta_only) { int ret; uint64_t size; @@ -938,7 +938,7 @@ struct mp4 *mp4_open_read(const struct mp4_callback *cb) struct mp4 *f = para_calloc(sizeof(struct mp4)); f->cb = cb; - ret = parse_root_atoms(f, 0); + ret = parse_root_atoms(f, false); if (ret < 0) { free(f); return NULL; @@ -1064,7 +1064,7 @@ struct mp4 *mp4_open_meta(const struct mp4_callback *cb) struct mp4 *f = para_calloc(sizeof(struct mp4)); f->cb = cb; - ret = parse_root_atoms(f, 1); + ret = parse_root_atoms(f, true); if (ret < 0) { free(f); return NULL; -- 2.39.2