View Issue Details

IDProjectCategoryView StatusLast Update
0004542JEDI VCL00 JVCL Componentspublic2008-10-19 12:54
ReporterTorbenAssigned To 
Status closedResolutionfixed 
Product VersionDaily / GIT 
Target VersionFixed in Version3.36 
Summary0004542: TJvID3v2 writing invalid headers
DescriptionIn some cases, TJvID3v2 writes tags which won't be recognized by other software like Winamp or Mp3tag. The invalid tags have a "flags" field with invalid bits set.

Obviously, this is caused by TJvID3Header.Write not initializing the Header.Flags field with 0 before using Inc() to add bits to it, so Flags may have random bits set.
Additional InformationThe following patch corrects this problem:

Index: JvID3v2Base.pas
--- JvID3v2Base.pas (revision 11973)
+++ JvID3v2Base.pas (working copy)
@@ -6285,6 +6285,7 @@
       Header.Identifier := cID3HeaderId;
       Header.MajorVersion := CMajorVersion[Controller.WriteVersion];
       Header.RevisionNumber := CRevisionNumber[Controller.WriteVersion];
+ Header.Flags := 0;
       { v2.2 : %ae000000 a - Unsynchronisation d - Footer present
         v2.3 : %abc00000 b - Extended header e - Compression (only v2.2)
TagsNo tags attached.



2008-10-19 10:03

developer   ~0014885

The "Header" record is initialized to zero by

FillChar(Header, SizeOf(Header), #0);

Could it be that you see a different bug?


2008-10-19 10:30

reporter   ~0014886

Sorry, you're right. This bug has already been fixed.

It was present in JVCL 3.10, on which the stable branch of my software is still based. When looking at the latest SVN version, I saw that there's still no "Flags := 0" yet, but I didn't notice the FillChar either.

So I was reporting a bug in an older version without properly checking the lastest version first. Sorry for that.


2008-10-19 12:53

developer   ~0014887

Already fixed.

Issue History

Date Modified Username Field Change
2008-10-19 08:26 Torben New Issue
2008-10-19 10:03 AHUser Note Added: 0014885
2008-10-19 10:04 AHUser Status new => feedback
2008-10-19 10:30 Torben Note Added: 0014886
2008-10-19 12:53 AHUser Status feedback => closed
2008-10-19 12:53 AHUser Note Added: 0014887
2008-10-19 12:54 AHUser Resolution open => fixed
2008-10-19 12:54 AHUser Fixed in Version => Daily / SVN