aboutsummaryrefslogtreecommitdiffstats
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
parent3b78c180e44a0fe82c38dc8fb1af66d7fde20ab8 (diff)
downloadffmpeg-c4a378855e7a37605af3f9120537ed9bbc5d3996.tar.gz
id3v2: reduce the scope of some non-globally-used symbols/structures
-rw-r--r--libavformat/id3v2.c22
-rw-r--r--libavformat/id3v2.h10
2 files changed, 14 insertions, 18 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);
}
diff --git a/libavformat/id3v2.h b/libavformat/id3v2.h
index 13dec399d1..4fb738a764 100644
--- a/libavformat/id3v2.h
+++ b/libavformat/id3v2.h
@@ -59,13 +59,6 @@ typedef struct ID3v2ExtraMetaGEOB {
uint8_t *data;
} ID3v2ExtraMetaGEOB;
-typedef struct ID3v2EMFunc {
- const char *tag3;
- const char *tag4;
- void (*read)(AVFormatContext*, AVIOContext*, int, char*, ID3v2ExtraMeta **);
- void (*free)();
-} ID3v2EMFunc;
-
/**
* Detect ID3v2 Header.
* @param buf must be ID3v2_HEADER_SIZE byte long
@@ -99,11 +92,8 @@ void ff_id3v2_read_all(AVFormatContext *s, const char *magic, ID3v2ExtraMeta **e
*/
void ff_id3v2_free_extra_meta(ID3v2ExtraMeta **extra_meta);
-extern const ID3v2EMFunc ff_id3v2_extra_meta_funcs[];
-
extern const AVMetadataConv ff_id3v2_34_metadata_conv[];
extern const AVMetadataConv ff_id3v2_4_metadata_conv[];
-extern const AVMetadataConv ff_id3v2_2_metadata_conv[];
/**
* A list of text information frames allowed in both ID3 v2.3 and v2.4