]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
mp4: Rename mp4ff_open_read_metaonly() -> mp4ff_open_meta().
authorAndre Noll <maan@tuebingen.mpg.de>
Wed, 11 Aug 2021 14:56:57 +0000 (16:56 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 30 May 2022 19:37:35 +0000 (21:37 +0200)
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
mp4.c
mp4.h

index 15e338e5b61efb84d39e24fbff17952137008871..0993913a9e16766dde1c7902e50679f000de34e3 100644 (file)
--- 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 46aec2db6cf42ab50ecb2d99aef2bd0c7b4181f8..3bf2ae4eed7dcc0a5695b87ac0bacbe90332be5f 100644 (file)
--- 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 ecab89b3080bcd42a7153233ed9c69b4a983ebc1..98a8e70cf87441e29efc392e8c7dc3e90971430a 100644 (file)
--- 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);