Bug 96181 - Does not find all COMment fields in ID3v2.2 Tags (created by iTunes)
Summary: Does not find all COMment fields in ID3v2.2 Tags (created by iTunes)
Status: RESOLVED FIXED
Alias: None
Product: taglib
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Scott Wheeler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-02 19:04 UTC by Clemens Wacha
Modified: 2005-05-18 02:04 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Clemens Wacha 2005-01-02 19:04:47 UTC
Version:            (using KDE KDE 3.3.2)
Installed from:    Compiled From Sources

iTunes creates two Comment fields with some sort of checksum information. If you add a comment yourself you then have 3 comment frames in the file. I don't think that the first 2 frames are illegal but taglib only lists the first two of them   and does not show the real comment made by the user.

framelist lists the following data:
>framelist.exe "05 Your Eyes Open.mp3"
******************** "05 Your Eyes Open.mp3"********************
TagLib: MPEG::Header::parse() -- Invalid sample rate.
ID3v2.2.0, 24351 bytes in tag
TIT2 - "Your Eyes Open"
TPE1 - "Keane"
TCOM - "Chaplin/Hughes/Rice-Oxley"
TALB - "Hopes And Fears"
TRCK - "5/12"
TPOS - "1/1"
TDRC - "2004"
TENC - "iTunes v4.6.0.15"
COMM - ""
COMM - ""
TCON - "Rock/Pop"
APIC - ""

ID3v1
title   - "Your Eyes Open"
artist  - "Keane"
album   - "Hopes And Fears"
year    - "2004"
comment - " 00001472 00001AA1 0000CF5D "
track   - "5"
genre   - "Other"

I tried to rewrite the tag but it only gets worse:

>tagwriter.exe -c bla "05 Your Eyes Open.mp3"
TagLib: MPEG::Header::parse() -- Invalid sample rate.

>framelist.exe "05 Your Eyes Open.mp3"
******************** "05 Your Eyes Open.mp3"********************
TagLib: MPEG::Header::parse() -- Invalid sample rate.
ID3v2.4.0, 24351 bytes in tag
TIT2 - "Your Eyes Open"
TPE1 - "Keane"

ID3v1
title   - "Your Eyes Open"
artist  - "Keane"
album   - "Hopes And Fears"
year    - "2004"
comment - " 00001472 00001AA1 0000CF5D "
track   - "0"
genre   - "Other"

(I compiled taglib under windows 2000 using devcpp with only minimal changes - this is NOT the problem)
Comment 1 Clemens Wacha 2005-01-03 13:32:06 UTC
Update: taglib cannot properly import COM fields from ID3v2.2 Tags created by iTunes. I converted the tags with iTunes to 2.4 and everything worked. The rewrite of the tag just shows another problem and has nothing to do the import failure. I will open a seperate bug report for this one.
Comment 2 Clemens Wacha 2005-01-03 16:34:58 UTC
Looks like APIC Frames have the same problem.
Comment 3 Clemens Wacha 2005-01-03 18:07:50 UTC
in id3v2framefactory.cpp function FrameFactory::createFrame you call updateFrame to convert from 3-byte ID2v2.2 to 4-byte ID3v2.4. Afterwards you HAVE TO update the frameID to point to the converted data:

>>>>>>>>>>>>>>>>>>
  if(!updateFrame(header)) {
    delete header;
    return 0;
  }
------------------
  if(!updateFrame(header)) {
    delete header;
    return 0;
  }

  // since we may have converted a IDv2.2 tag we have to reread the frameID
  frameID = header->frameID();
<<<<<<<<<<<<<<<<<<<

That solves the problems with the comment field

Problems left: APIC Description is now visible but contains some illegal characters.
Comment 4 Scott Wheeler 2005-05-18 02:04:59 UTC
Fixed this one earlier today.