[FFmpeg-devel] [PATCH 03/11] Mark metadata conversion table for ID3v2.2 as static to id3v2.c.
Janne Grunau
janne-ffmpeg
Tue Jan 25 01:02:26 CET 2011
On Tue, Jan 25, 2011 at 12:36:11AM +0100, Diego Elio Petten? wrote:
> This table is never used outside of ff_id3v2_read, so it makes sense to be
> staticised.
> ---
> libavformat/id3v2.c | 4 +++-
> libavformat/id3v2.h | 1 -
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
> index 7cedf6e..dc63b68 100644
> --- a/libavformat/id3v2.c
> +++ b/libavformat/id3v2.c
> @@ -248,6 +248,8 @@ static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t
> av_free(buffer);
> }
>
> +static const AVMetadataConv ff_id3v2_2_metadata_conv[];
> +
> void ff_id3v2_read(AVFormatContext *s, const char *magic)
> {
> int len, ret;
> @@ -306,7 +308,7 @@ const AVMetadataConv ff_id3v2_4_metadata_conv[] = {
> { 0 }
> };
>
> -const AVMetadataConv ff_id3v2_2_metadata_conv[] = {
> +static const AVMetadataConv ff_id3v2_2_metadata_conv[] = {
> { "TAL", "album"},
> { "TCO", "genre"},
> { "TT2", "title"},
> diff --git a/libavformat/id3v2.h b/libavformat/id3v2.h
> index e429001..3378a2a 100644
> --- a/libavformat/id3v2.h
> +++ b/libavformat/id3v2.h
> @@ -67,7 +67,6 @@ void ff_id3v2_read(AVFormatContext *s, const char *magic);
>
> 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
I guess there is little need to have ff_id3v2_2_metadata_conv visible,
consistancy with the other to changes might be an argument. Anton, do
you have an opinion?
Janne
More information about the ffmpeg-devel
mailing list