[FFmpeg-devel] [PATCH] Shorten ID3v2 tags
Anton Khirnov
wyskas
Sat Jul 3 07:05:51 CEST 2010
On Sat, Jul 03, 2010 at 01:02:50AM +0200, James Darnley wrote:
> Currently an unnecessary NULL byte is written at the end of each ID3v2
> tag. The docs linked to here (
> http://www.id3.org/Developer_Information ) do not say that the NULL
> byte is necessary. No other software writes this byte (lame.exe,
> Winamp, mp3tag).
As far as i understand the specs, strings should be NULL-terminated.
http://id3.org/id3v2.4.0-structure says:
4. ID3v2 frame overview
[...]
Frames that allow different types of text encoding contains a text
encoding description byte. Possible encodings:
$00 ISO-8859-1 [ISO-8859-1]. Terminated with $00.
$01 UTF-16 [UTF-16] encoded Unicode [UNICODE] with BOM. All
strings in the same frame SHALL have the same byteorder.
Terminated with $00 00.
$02 UTF-16BE [UTF-16] encoded Unicode [UNICODE] without BOM.
Terminated with $00 00.
$03 UTF-8 [UTF-8] encoded Unicode [UNICODE]. Terminated with $00.
Strings dependent on encoding are represented in frame descriptions
as <text string according to encoding>, or <full text string
according to encoding> if newlines are allowed. Any empty strings of
type $01 which are NULL-terminated may have the Unicode BOM followed
by a Unicode NULL ($FF FE 00 00 or $FE FF 00 00).
Anton Khirnov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100703/4f405f6b/attachment.pgp>
More information about the ffmpeg-devel
mailing list