]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - opus_afh.c
Prefix public functions of ogg_afh_common.c with "oac".
[paraslash.git] / opus_afh.c
index ace83008d60db987cfa3350a13d5dc40d365819f..bdc4a96dce306638d64ce6838dc4e5139ac89934 100644 (file)
@@ -17,7 +17,7 @@
 #include "opus_common.h"
 #include "ogg_afh_common.h"
 
-static const char* opus_suffixes[] = {"opus", NULL};
+static const char * const opus_suffixes[] = {"opus", NULL};
 
 #define OPUS_COMMENT_HEADER "OpusTags"
 
@@ -55,7 +55,7 @@ static int opus_get_comments(char *comments, int length,
        p += 4;
        if (p + ntags * 4 > end)
                return -E_OPUS_COMMENT;
-       PARA_INFO_LOG("found %d tag(s)\n", ntags);
+       PARA_INFO_LOG("found %u tag(s)\n", ntags);
        for (i = 0; i < ntags; i++, p += val) {
                char *tag;
 
@@ -96,7 +96,8 @@ static int opus_packet_callback(ogg_packet *packet, int packet_num,
                if (ret < 0)
                        return ret;
                afhi->channels = oh->channels;
-               afhi->techinfo = make_message("header version %d, input sample rate: %dHz",
+               afhi->techinfo = make_message(
+                       "header version %d, input sample rate: %" PRIu32 "Hz",
                        oh->version, oh->input_sample_rate);
                /*
                 * The input sample rate is irrelevant for afhi->frequency as
@@ -122,11 +123,11 @@ static int opus_get_file_info(char *map, size_t numbytes, __a_unused int fd,
        int ret, ms;
        struct opus_header oh = {.version = 0};
 
-       struct ogg_afh_callback_info opus_callback_info = {
+       struct oac_callback_info opus_callback_info = {
                .packet_callback = opus_packet_callback,
                .private_data = &oh,
        };
-       ret = ogg_get_file_info(map, numbytes, afhi, &opus_callback_info);
+       ret = oac_get_file_info(map, numbytes, afhi, &opus_callback_info);
        if (ret < 0)
                return ret;
        ret = (afhi->chunk_table[afhi->chunks_total] - afhi->chunk_table[0]) * 8; /* bits */
@@ -221,7 +222,7 @@ static int opus_rewrite_tags(const char *map, size_t mapsize,
        int ret;
 
        meta_sz = opus_make_meta_packet(tags, &meta_packet);
-       ret = ogg_rewrite_tags(map, mapsize, output_fd, meta_packet, meta_sz);
+       ret = oac_rewrite_tags(map, mapsize, output_fd, meta_packet, meta_sz);
        free(meta_packet);
        return ret;
 }