[ID3 Dev] tagsize calcultaion
Ben Bennett
fiji at ayup.limey.net
Mon Apr 11 10:35:01 PDT 2005
On Sun, Apr 10, 2005 at 01:28:52PM +0800, Christophe Kualasoft wrote:
> Hi,
As a warning, this list seems very quiet. I posted a question about
the iTunes frame size not being syncsafe in 2.4 (which looks like an
error to me) and got no reply.
I have been working on the Perl ID3v2 parser (to give int 2.4 support
and implement support for all 2.3 and 2.4 frame) but I have no insight
other than what I have read in the two specs.
> My questions:
>
> According to spec the size value in the ID3v2 header should include the size
> of the padding bytes.
> and then the extended header should include the padding size as well. Why
> include the padding size into
> 2 places?
In 2.3 that is the case. It is obviously needed in the main header
since it tells programs where to read the tag (or how far to skip if
they don't care). I can only guess that it is in the extended header
to tell an ID3 parser how much memory it needs to allocate to hold the
unparsed frame in memory. However, I can't find anything in the spec
that actually requires the extended header if padding is present. If
you write an extended header it must contain the padding size.
In the spirit of "Be liberal in what you accept, and conservative in
what you send" (from the late great Jon Postel) I would generate an
extended header but write the parser to stop looking for tags when it
hits the first frame name that is all nul bytes.
In 2.4 the extended header does not contain the padding size.
> BTW, the improved vdHeide will be available as open source on sourceforge.
Cool. And my library will be available on CPAN as MPEG::ID3v2Tag
(assuming the current author accepts my diffs).
-ben
---------------------------------------------------------------------
To unsubscribe, e-mail: id3v2-unsubscribe at id3.org
For additional commands, e-mail: id3v2-help at id3.org
More information about the ID3v2
mailing list