[FFmpeg-devel] [PATCH] skip padding at the end of id3 tags

Michael Niedermayer michaelni
Tue Oct 13 22:03:28 CEST 2009


On Mon, Oct 12, 2009 at 09:27:47PM +0000, Jai Menon wrote:
> Hi,
> 
> I think the recent id3 tag parsing changes led to a regression as in
> subject. Attached patch fixes this.
> 
> -- 
> Jai Menon
> 

>  id3v2.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 6504dad6f4eeeb73e68ba6a1a96383d0d3d12b13  0001-Skip-padding-at-the-end-of-id3-tags.patch
> >From 83fa7ac456316b2f822f1c8fee18a06b44436446 Mon Sep 17 00:00:00 2001
> From: Jai Menon <jai at retroficial.org>
> Date: Sun, 11 Oct 2009 10:21:34 +0000
> Subject: [PATCH 1/1] Skip padding at the end of id3 tags.
> 
> ---
>  libavformat/id3v2.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
> index 88472e7..b3364f5 100644
> --- a/libavformat/id3v2.c
> +++ b/libavformat/id3v2.c
> @@ -213,7 +213,10 @@ void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t flags)
>  
>          if (tag[0] == 'T')
>              read_ttag(s, tlen, tag);
> -
> +        else if (!tag[0]) {

the old code checked all of tag, this checks just the first byte
why?

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091013/6a8c5214/attachment.pgp>



More information about the ffmpeg-devel mailing list