[FFmpeg-devel] [PATCH 3/3] id3v2: don't overwrite existing tags

Måns Rullgård mans
Thu Jan 20 12:45:55 CET 2011


Anton Khirnov <anton at khirnov.net> writes:

> Apparrently some broken taggers append a new ID3v2 tag leaving the
> existing one intact. Our parser currently reads all tags and overwrites
> existing values with supposedly outdated ones.

Did you mean prefix rather than append?  I can't make sense of this
any other way.

> fixes issue2419
> ---
>  libavformat/id3v2.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
> index 715b8f6..bbe9d52 100644
> --- a/libavformat/id3v2.c
> +++ b/libavformat/id3v2.c
> @@ -157,7 +157,7 @@ static void read_ttag(AVFormatContext *s, ByteIOContext *pb, int taglen, const c
>          val = dst;
>
>      if (val)
> -        av_metadata_set2(&s->metadata, key, val, 0);
> +        av_metadata_set2(&s->metadata, key, val, AV_METADATA_DONT_OVERWRITE);
>  }
>
>  static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t flags)
> -- 
> 1.7.2.3
>

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list