From 3c093341c032adfe8b1113fe840170123358f86a Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Wed, 11 Aug 2021 16:56:57 +0200 Subject: [PATCH] mp4: Rename mp4ff_open_read_metaonly() -> mp4ff_open_meta(). The old name is misleading because the returned file handle is by no means opened read-only. In fact we call mp4ff_meta_update() on it, which alters the file to store the modified metadata. --- aac_afh.c | 2 +- mp4.c | 2 +- mp4.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aac_afh.c b/aac_afh.c index 15e338e5..0993913a 100644 --- a/aac_afh.c +++ b/aac_afh.c @@ -250,7 +250,7 @@ static int aac_afh_rewrite_tags(const char *map, size_t mapsize, return ret; lseek(fd, 0, SEEK_SET); - mp4ff = mp4ff_open_read_metaonly(&cb); + mp4ff = mp4ff_open_meta(&cb); if (!mp4ff) return -E_MP4FF_OPEN; diff --git a/mp4.c b/mp4.c index 46aec2db..3bf2ae4e 100644 --- a/mp4.c +++ b/mp4.c @@ -1461,7 +1461,7 @@ int32_t mp4ff_num_samples(const struct mp4ff *f, int32_t track) return total; } -struct mp4ff *mp4ff_open_read_metaonly(struct mp4ff_callback *f) +struct mp4ff *mp4ff_open_meta(struct mp4ff_callback *f) { struct mp4ff *ff = para_calloc(sizeof(struct mp4ff)); diff --git a/mp4.h b/mp4.h index ecab89b3..98a8e70c 100644 --- a/mp4.h +++ b/mp4.h @@ -31,7 +31,7 @@ uint32_t mp4ff_get_sample_rate(const struct mp4ff *f, int32_t track); uint32_t mp4ff_get_channel_count(const struct mp4ff * f, int32_t track); int32_t mp4ff_num_samples(const struct mp4ff *f, int track); uint64_t mp4ff_get_duration(const struct mp4ff *f, int32_t track); -struct mp4ff *mp4ff_open_read_metaonly(struct mp4ff_callback *f); +struct mp4ff *mp4ff_open_meta(struct mp4ff_callback *f); int mp4ff_meta_get_by_index(const struct mp4ff *f, unsigned int index, char **item, char **value); -- 2.39.2