I have a file that was tagged with an id3v2.2 tag. When I go to write out the tag, most of the frames are not being written out.
When the tag is parsed, it hits this snippet in id3_frame_parse several times:
if (ID3_TAG_VERSION_MAJOR(version) == 2) { xid[0] = 'Y'; xid[1] = id[0]; xid[2] = id[1]; xid[3] = id[2];
id = xid;
flags |= ID3_FRAME_FLAG_TAGALTERPRESERVATION | ID3_FRAME_FLAG_FILEALTERPRESERVATION; }
...and the flag bits that are being set, as far as I can tell, function solely to prevent the frame from being rendered.
I'm guessing that because these are older frame types (TT2, TP1, etc.) that they are being parsed and flagged so that the lib can create a frame with a newer tag type? and write it out instead? But it looks like most of my frames have these flags set.
Sometimes the frames DO get written out and but I haven't figured out under what conditions yet.
Is there a function lying around that prints the contents of the frames as they exist in memory? It would be helpful to me to see a before and after snapshot of my frames.
Thanks,
- Mark Malson mark@mmalson.com
Hi Mark,
Thanks for your note...
I have a file that was tagged with an id3v2.2 tag. When I go to write out the tag, most of the frames are not being written out.
When the tag is parsed, it hits this snippet in id3_frame_parse several times:
if (ID3_TAG_VERSION_MAJOR(version) == 2) { xid[0] = 'Y'; xid[1] = id[0]; xid[2] = id[1]; xid[3] = id[2];
id = xid; flags |= ID3_FRAME_FLAG_TAGALTERPRESERVATION | ID3_FRAME_FLAG_FILEALTERPRESERVATION;
}
...and the flag bits that are being set, as far as I can tell, function solely to prevent the frame from being rendered.
This looks like a bug. The frame is being marked not to be preserved even if an equivalent compatibility frame ID was found. The frame ID may also be munged unnecessarily.
I'm guessing that because these are older frame types (TT2, TP1, etc.) that they are being parsed and flagged so that the lib can create a frame with a newer tag type? and write it out instead? But it looks like most of my frames have these flags set.
ID3v2.2 frames with equivalent ID3v2.4 frames are supposed to be renamed automatically, but in this case things got a little confused. Please try the attached patch.
Is there a function lying around that prints the contents of the frames as they exist in memory? It would be helpful to me to see a before and after snapshot of my frames.
Not really. You can look at things fairly easily with GDB, but a tag dumper would probably be a useful tool.
Cheers, -rob
Rob, thanks for the patch. Works great.
On 10/10/02 12:04 AM, "Rob Leslie" rob@mars.org wrote:
ID3v2.2 frames with equivalent ID3v2.4 frames are supposed to be renamed automatically, but in this case things got a little confused. Please try the attached patch.