Bug 138829 - taglib ignores unsynchronisation
Summary: taglib ignores unsynchronisation
Status: RESOLVED FIXED
Alias: None
Product: taglib
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Scott Wheeler
URL:
Keywords:
: 148501 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-12-15 01:36 UTC by Gioele Barabucci
Modified: 2007-11-11 21:26 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot of collection with cut tags (47.97 KB, image/png)
2006-12-17 03:27 UTC, Gioele Barabucci
Details
Screenshot of the edit tags dialog with cut tags (28.23 KB, image/png)
2006-12-17 03:30 UTC, Gioele Barabucci
Details
patch to decode unsynchronised tag/frame data (9.01 KB, patch)
2007-02-04 22:59 UTC, Lukáš Lalinský
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gioele Barabucci 2006-12-15 01:36:53 UTC
Version:           1.4.4 (using KDE 3.5.5, Gentoo)
Compiler:          Target: powerpc-unknown-linux-gnu
OS:                Linux (ppc) release 2.6.19-gentoo-r1

Some of my MP3 show up as made by "Unknown" and their title is cut off like "y babe just cares for m" (first and last char dropped).

The same file processed via id3info (part of id3lib) shows

| *** Tag information for Nina Simone - My babe just cares for me.mp3
| === TIT2 (Title/songname/content description): My babe just cares for me
| === TPE1 (Lead performer(s)/Soloist(s)): Nina Simone
| === TALB (Album/Movie/Show title): 100% Jazz
| === TRCK (Track number/Position in set): 03
| === TLEN (Length): 216000
| *** mp3 info
| MPEG1/layer I
| Bitrate: 0KBps
| Frequency: 48KHz
Comment 1 Gioele Barabucci 2006-12-15 01:37:50 UTC
hexdump of the file

$ hexdump -C Nina\ Simone\ -\ My\ babe\ just\ cares\ for\ me.mp3 | head -n 20
00000000  49 44 33 03 00 80 00 00  01 30 54 49 54 32 00 00  |ID3......0TIT2..|
00000010  00 35 00 00 01 fe ff 00  00 4d 00 79 00 20 00 62  |.5.......M.y. .b|
00000020  00 61 00 62 00 65 00 20  00 6a 00 75 00 73 00 74  |.a.b.e. .j.u.s.t|
00000030  00 20 00 63 00 61 00 72  00 65 00 73 00 20 00 66  |. .c.a.r.e.s. .f|
00000040  00 6f 00 72 00 20 00 6d  00 65 54 50 45 31 00 00  |.o.r. .m.eTPE1..|
00000050  00 19 00 00 01 fe ff 00  00 4e 00 69 00 6e 00 61  |.........N.i.n.a|
00000060  00 20 00 53 00 69 00 6d  00 6f 00 6e 00 65 54 41  |. .S.i.m.o.n.eTA|
00000070  4c 42 00 00 00 15 00 00  01 fe ff 00 00 31 00 30  |LB...........1.0|
00000080  00 30 00 25 00 20 00 4a  00 61 00 7a 00 7a 54 52  |.0.%. .J.a.z.zTR|
00000090  43 4b 00 00 00 07 00 00  01 fe ff 00 00 30 00 33  |CK...........0.3|
000000a0  54 4c 45 4e 00 00 00 0f  40 00 01 fe ff 00 00 32  |TLEN....@......2|
000000b0  00 31 00 36 00 30 00 30  00 30 ff fb 90 0c 00 0f  |.1.6.0.0.0......|
000000c0  f0 c6 02 48 00 00 00 00  1c 00 49 10 00 00 00 03  |...H......I.....|
000000d0  00 09 2c 00 00 00 00 5e  01 25 c0 00 00 00 ff ff  |..,....^.%......|
000000e0  ff ff ff ff ff ff ff ff  ff ff ff e5 ff ac fc a0  |................|
000000f0  0c 1f 3e 7d 47 cb bf ff  ff ff ff ff ff ff ff ff  |..>}G...........|
00000100  ff ff ff ff f2 e3 86 02  07 35 02 00 30 7d e5 c1  |.........5..0}..|
00000110  f7 4b bf ff ff ff ff ff  ff ff ff ff ff ff ff ff  |.K..............|
00000120  ba 9b f9 52 22 4a d8 5c  06 c4 bb ff ff ff ff ff  |...R"J.\........|
00000130  ff ff ff ff ff ff ff ff  d3 43 1d e5 9c 82 67 90  |.........C....g.|
Comment 2 Mark Kretschmann 2006-12-15 08:15:22 UTC
Could you attach a screenshot?
Comment 3 Gioele Barabucci 2006-12-17 03:27:15 UTC
Created attachment 18958 [details]
Screenshot of collection with cut tags
Comment 4 Gioele Barabucci 2006-12-17 03:30:04 UTC
Created attachment 18959 [details]
Screenshot of the edit tags dialog with cut tags
Comment 5 Alexandre Oliveira 2006-12-18 01:17:45 UTC
Please, make the file available for testing
Comment 6 Alexandre Oliveira 2006-12-22 02:05:30 UTC
I've got the file, and we have the same behaviour on other taglib apps (like the properties dialog of konqueror).
So, I'm reassinging this to taglib.
Comment 7 Alexandre Oliveira 2006-12-22 02:09:15 UTC
138829.mp3 sent to Wheeler by e-mail.
Comment 8 Gioele Barabucci 2007-01-07 12:57:35 UTC
I found another file with the exact same problem. Do you need it?
Comment 9 Lukáš Lalinský 2007-02-04 22:59:02 UTC
Created attachment 19558 [details]
patch to decode unsynchronised tag/frame data

Hi, the attached patch correctly decodes unsychronised data, which is the
problem in this report. The patch contains a few unrelated changes from my
branch, but you can just ignore those. Also, it breaks binary compatibility
with previous TagLib versions.
Comment 10 Scott Wheeler 2007-02-13 12:08:05 UTC
Ah, yeah, see it now -- this is an interaction between id3v2.3 unsynchronization with the UTF16 byte-order-mark.  Fun.
Comment 11 Scott Wheeler 2007-07-18 14:48:26 UTC
SVN commit 689506 by wheeler:

Spelling fixes (first part of a patch from Lucas Lalinsky)

CCBUG:138829


 M  +9 -4      id3v2frame.cpp  
 M  +5 -3      id3v2frame.h  


--- trunk/kdesupport/taglib/taglib/mpeg/id3v2/id3v2frame.cpp #689505:689506
@@ -200,7 +200,7 @@
     groupingIdentity(false),
     compression(false),
     encryption(false),
-    unsyncronisation(false),
+    unsynchronisation(false),
     dataLengthIndicator(false)
     {}
 
@@ -216,7 +216,7 @@
   bool groupingIdentity;
   bool compression;
   bool encryption;
-  bool unsyncronisation;
+  bool unsynchronisation;
   bool dataLengthIndicator;
 };
 
@@ -381,7 +381,7 @@
       d->groupingIdentity    = flags[6]; // (structure 4.1.2.h)
       d->compression         = flags[3]; // (structure 4.1.2.k)
       d->encryption          = flags[2]; // (structure 4.1.2.m)
-      d->unsyncronisation    = flags[1]; // (structure 4.1.2.n)
+      d->unsynchronisation   = flags[1]; // (structure 4.1.2.n)
       d->dataLengthIndicator = flags[0]; // (structure 4.1.2.p)
     }
     break;
@@ -451,9 +451,14 @@
 
 bool Frame::Header::unsycronisation() const
 {
-  return d->unsyncronisation;
+  return unsynchronisation();
 }
 
+bool Frame::Header::unsynchronisation() const
+{
+  return d->unsynchronisation;
+}
+
 bool Frame::Header::dataLengthIndicator() const
 {
   return d->dataLengthIndicator;
--- trunk/kdesupport/taglib/taglib/mpeg/id3v2/id3v2frame.h #689505:689506
@@ -353,12 +353,14 @@
        */
       bool encryption() const;
 
+#ifndef DO_NOT_DOCUMENT			
+			bool unsycronisation() const;
+#endif
+
       /*!
        * Returns true if unsyncronisation is enabled for this frame.
-       *
-       * \note This flag is currently ignored internally in TagLib.
        */
-      bool unsycronisation() const;
+      bool unsynchronisation() const;
 
       /*!
        * Returns true if the flag for a data length indicator is set.
Comment 12 Scott Wheeler 2007-08-05 12:46:54 UTC
*** Bug 148501 has been marked as a duplicate of this bug. ***
Comment 13 Scott Wheeler 2007-11-06 19:55:04 UTC
Lucas just checked in the fix for this.