[id3lib-devel] Bug in Size/Render..?
Brought to you by:
t1mpy
From: Romain B. <to...@ra...> - 2011-08-23 04:46:26
|
Hi Guys! I have the following test code: ----- #include <id3/tag.h> #include <stdio.h> int main() { ID3_Tag *tag = new ID3_Tag(); ID3_Frame *frame = new ID3_Frame(ID3FID_TITLE); frame->GetField(ID3FN_TEXT)->Set("foo"); tag->AttachFrame(frame); size_t size = tag->Size(); printf("Size: %lu\n",size); uchar *buffer = new uchar[size]; size_t len = tag->Render(buffer); printf("Render: %lu\n",len); return 0; } ----- Which outputs: Size: 2038 Render: 2048 The problem is that Render > Size despite what the doc says.. And it gets even worse with padding disabled.. Am I doing something wrong? Romain |