[FFmpeg-devel] [PATCH] id3v2: always skip padding

Michael Niedermayer michaelni
Tue Jul 27 15:23:32 CEST 2010


On Tue, Jul 27, 2010 at 12:29:29PM +1000, Alexander Kojevnikov wrote:
> Hi list,
> 
> If padding at the end of an id3v2 tag is less than `taghdrlen` (10
> bytes), it is not skipped. As a result, the buffer points at an
> incorrect position which later results in "Header missing" errors.
> 
> Attached patch fixes this issue.
> 
> Cheers,
> Alex

>  id3v2.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 0fee5829ca199fc7ff83ad27e5ee8af839a365ab  0001-id3v2-always-skip-padding.patch
> From 19f82c52719b7cac498acdc1392c9c8c80eafb3f Mon Sep 17 00:00:00 2001
> From: Alexander Kojevnikov <alexander at kojevnikov.com>
> Date: Tue, 27 Jul 2010 12:20:37 +1000
> Subject: [PATCH] id3v2: always skip padding
> 
> ---
>  libavformat/id3v2.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
> index 38c272a..8d050af 100644
> --- a/libavformat/id3v2.c
> +++ b/libavformat/id3v2.c
> @@ -266,13 +266,16 @@ void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t flags)
>          else if (!tag[0]) {
>              if (tag[1])
>                  av_log(s, AV_LOG_WARNING, "invalid frame id, assuming padding");
> -            url_fskip(s->pb, len);

this maybe should be tlen

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

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100727/2ea5f7db/attachment.pgp>



More information about the ffmpeg-devel mailing list