summaryrefslogtreecommitdiff
path: root/libavformat/id3v2.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2011-10-10 15:51:02 +0200
committerDiego Biurrun <diego@biurrun.de>2011-10-13 23:20:37 +0200
commitc4a378855e7a37605af3f9120537ed9bbc5d3996 (patch)
treee2e52c690cf110b6fba4424af88425c06971a872 /libavformat/id3v2.c
parent3b78c180e44a0fe82c38dc8fb1af66d7fde20ab8 (diff)
downloadffmpeg-c4a378855e7a37605af3f9120537ed9bbc5d3996.tar.gz
id3v2: reduce the scope of some non-globally-used symbols/structures
Diffstat (limited to 'libavformat/id3v2.c')
-rw-r--r--libavformat/id3v2.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
index 9c715eeefa..c593007e87 100644
--- a/libavformat/id3v2.c
+++ b/libavformat/id3v2.c
@@ -54,7 +54,7 @@ const AVMetadataConv ff_id3v2_4_metadata_conv[] = {
{ 0 }
};
-const AVMetadataConv ff_id3v2_2_metadata_conv[] = {
+static const AVMetadataConv id3v2_2_metadata_conv[] = {
{ "TAL", "album"},
{ "TCO", "genre"},
{ "TT2", "title"},
@@ -380,7 +380,14 @@ finish:
av_dict_set(m, "date", date, 0);
}
-const ID3v2EMFunc ff_id3v2_extra_meta_funcs[] = {
+typedef struct ID3v2EMFunc {
+ const char *tag3;
+ const char *tag4;
+ void (*read)(AVFormatContext*, AVIOContext*, int, char*, ID3v2ExtraMeta **);
+ void (*free)();
+} ID3v2EMFunc;
+
+static const ID3v2EMFunc id3v2_extra_meta_funcs[] = {
{ "GEO", "GEOB", read_geobtag, free_geobtag },
{ NULL }
};
@@ -393,13 +400,12 @@ const ID3v2EMFunc ff_id3v2_extra_meta_funcs[] = {
static const ID3v2EMFunc *get_extra_meta_func(const char *tag, int isv34)
{
int i = 0;
- while (ff_id3v2_extra_meta_funcs[i].tag3) {
+ while (id3v2_extra_meta_funcs[i].tag3) {
if (!memcmp(tag,
- (isv34 ?
- ff_id3v2_extra_meta_funcs[i].tag4 :
- ff_id3v2_extra_meta_funcs[i].tag3),
+ (isv34 ? id3v2_extra_meta_funcs[i].tag4 :
+ id3v2_extra_meta_funcs[i].tag3),
(isv34 ? 4 : 3)))
- return &ff_id3v2_extra_meta_funcs[i];
+ return &id3v2_extra_meta_funcs[i];
i++;
}
return NULL;
@@ -560,7 +566,7 @@ void ff_id3v2_read_all(AVFormatContext *s, const char *magic, ID3v2ExtraMeta **e
}
} while (found_header);
ff_metadata_conv(&s->metadata, NULL, ff_id3v2_34_metadata_conv);
- ff_metadata_conv(&s->metadata, NULL, ff_id3v2_2_metadata_conv);
+ ff_metadata_conv(&s->metadata, NULL, id3v2_2_metadata_conv);
ff_metadata_conv(&s->metadata, NULL, ff_id3v2_4_metadata_conv);
merge_date(&s->metadata);
}