Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004542 [JEDI VCL] 00 JVCL Components major sometimes 2008-10-19 08:26 2008-10-19 12:54
Reporter Torben View Status public  
Assigned To
Priority normal Resolution fixed  
Status closed   Product Version Daily / GIT
Summary 0004542: TJvID3v2 writing invalid headers
Description In 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 Information The 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)
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0014885)
AHUser (developer)
2008-10-19 10:03

The "Header" record is initialized to zero by

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

Could it be that you see a different bug?
(0014886)
Torben (reporter)
2008-10-19 10:30

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.
(0014887)
AHUser (developer)
2008-10-19 12:53

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


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker