[vorbis-dev] embedding a lot of vorbis comments
Daniel Holth
dholth at fastmail.fm
Thu May 13 08:18:45 PDT 2004
Scott Wheeler wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>On Wednesday 12 May 2004 21:57, Daniel Holth wrote:
>
>
>>>implementation rather than on the standard itself. Specifically TagLib
>>>"trusts" the length as listed rather than looking for null characters.
>>>
>>>
>>the standard also specifies a null-terminated text encoding.
>>
>>
>
>Actually it very explicitly says the opposite. ;-)
>
>Again see http://www.xiph.org/ogg/vorbis/doc/v-comment.html
>
>"The vector length is encoded; the vector contents themselves are not null
>terminated."
>
>"5. Comment field 0 ([Comment field 0 length] octets coded from beginning of
>string to end of string, not null terminated)"
>
In info.c:
char *vorbis_comment_query(vorbis_comment *vc, char *tag, int count)
No comment length is returned.
Ah, I see it is not NULL terminated in the vorbis itself:
00000f0 f ) \t \0 \0 \0 T I T L E = U H F \r
0000100 \0 \0 \0 T R A C K N U M B E R = 6
but libvorbis adds a NULL terminator when decoding the comments.
- Daniel Holth
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Vorbis-dev
mailing list