Re: python bindings to libid3tag

Rob Leslie <[email protected]>
Newsgroups gmane.comp.audio.mad.devel
Message-ID <[email protected]>
On Sunday, October 12, 2003, at 03:22  PM, Alastair Tse wrote:
> I think the bindings are pretty complete except for id3_tag_render(). 
> I don't understand how to tell how much buffer to give to render a tag 
> or if it allocates the memory for you.

The way it works is like this: First call id3_tag_render() with a null 
buffer argument. It will return the maximum possible size of the 
rendered tag (without actually rendering yet). Then allocate your 
buffer using this size and pass it to the routine again, and this time 
the tag will be rendered in your buffer and the actual size returned. 
The actual size may be smaller than the original estimate, but it will 
never be larger.

Cheers,

-- 
Rob Leslie
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.