[FFmpeg-devel] skip multiple id3v2 headers

David Byron dbyron
Thu Sep 2 01:46:58 CEST 2010


I've run across some mp3 files with multiple id3v2 tags at the beginning.
In some particularly annoying cases, an additional tag contains data that
looks like the beginning of an mpeg frame.  Here's a patch to teach ffmpeg
to ignore additional id3v2 tags at the beginning of mp3 files.

This is my first time submitting a patch to ffmpeg.  I tried to follow the
rules at http://ffmpeg.org/developer.html but I'm not sure I did everything
correctly.  I do get some test failures, but the same ones before and after
the patch.  Same for checkheaders.  I can send these failures separately if
people are interested.  I could use a hand resolving them.

The mp3-conformance tests (make fate-mp3) pass with this patch.

I tested on:

$ uname -a
Linux UbuntuVM 2.6.28-19-generic #62-Ubuntu SMP Wed Jul 28 01:57:10 UTC 2010
x86_64 GNU/Linux

and

$ ./ffmpeg -version 1>/dev/null
FFmpeg version SVN-r25022, Copyright (c) 2000-2010 the FFmpeg developers
  built on Sep  1 2010 16:42:11 with gcc 4.3.3
  configuration: --prefix=/home/dbyron/src/ffmpeg_parent/install
--incdir=/home/dbyron/src/ffmpeg_parent/install/include/ffmpeg
--libdir=/home/dbyron/src/ffmpeg_parent/install/lib/ffmpeg
--bindir=/home/dbyron/src/ffmpeg_parent/install/bin/ffmpeg
--shlibdir=/home/dbyron/src/ffmpeg_parent/install/lib/ffmpeg
--disable-shared --enable-static --samples=/home/dbyron/ffmpeg_samples
  libavutil     50.24. 0 / 50.24. 0
  libavcore      0. 6. 0 /  0. 6. 0
  libavcodec    52.87. 0 / 52.87. 0
  libavformat   52.78. 3 / 52.78. 3
  libavdevice   52. 2. 1 / 52. 2. 1
  libavfilter    1.38. 1 /  1.38. 1
  libswscale     0.11. 0 /  0.11. 0

I can send an example file (~14k), or create an issue at roundup.ffmpeg.org
but I figured I'd try this way first.

Please consider applying this to the public repo or let me know what changes
would make that possible.

Thanks much.

-DB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: skip_extra_id3v2.patch
Type: application/octet-stream
Size: 2614 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100901/d6f280ff/attachment.obj>



More information about the ffmpeg-devel mailing list