]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - aac_afh.c
mp4: Replace the five tag value functions by a single one.
[paraslash.git] / aac_afh.c
index b6c90d59009a3315f9249e5e3b200429132d6296..ae1e99dc9662095af7cc887173c85b9598dd7796 100644 (file)
--- a/aac_afh.c
+++ b/aac_afh.c
@@ -107,13 +107,13 @@ static int aac_afh_get_chunk(uint32_t chunk_num, void *afh_context,
        return 1;
 }
 
-static void _aac_afh_get_taginfo(const struct mp4 *mp4, struct taginfo *tags)
+static void aac_afh_get_taginfo(const struct mp4 *mp4, struct taginfo *tags)
 {
-       tags->artist = mp4_meta_get_artist(mp4);
-       tags->title = mp4_meta_get_title(mp4);
-       tags->year = mp4_meta_get_date(mp4);
-       tags->album = mp4_meta_get_album(mp4);
-       tags->comment = mp4_meta_get_comment(mp4);
+       tags->artist = mp4_get_tag_value(mp4, "artist");
+       tags->title = mp4_get_tag_value(mp4, "title");
+       tags->year = mp4_get_tag_value(mp4, "date");
+       tags->album = mp4_get_tag_value(mp4, "album");
+       tags->comment = mp4_get_tag_value(mp4, "comment");
 }
 
 /*
@@ -162,7 +162,7 @@ static int aac_get_file_info(char *map, size_t numbytes, __a_unused int fd,
        if (aac_afh_get_chunk(0, c, &buf, &len) >= 0)
                numbytes -= buf - map;
        afhi->bitrate = 8 * numbytes / afhi->seconds_total / 1000;
-       _aac_afh_get_taginfo(c->mp4, &afhi->tags);
+       aac_afh_get_taginfo(c->mp4, &afhi->tags);
        ret = 1;
 close:
        aac_afh_close(c);