[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    k3b_0_11_branch: kdeextragear-1/k3b/src/audiodecoding/mp3
From:       Sebastian Trueg <sebastian () trueg ! de>
Date:       2004-08-10 9:10:52
Message-ID: 20040810091052.DB8CD9A13 () office ! kde ! org
[Download RAW message or body]

CVS commit by trueg: 

fixed id3v2 tag size calculation


  M +7 -3      k3bmad.cpp   1.1.2.3


--- kdeextragear-1/k3b/src/audiodecoding/mp3/k3bmad.cpp  #1.1.2.2:1.1.2.3
@@ -153,6 +153,10 @@ bool K3bMad::skipTag()
 
     // the size is saved as a synched int meaning bit 7 is always cleared to 0
-    int size = (buf[6]<<21) | (buf[7]<<14) | (buf[8]<<7) | buf[9];
-    int offset = size + 10;
+    unsigned int size = 
+      ( (buf[6] & 0x7f) << 21 ) | 
+      ( (buf[7] & 0x7f) << 14 ) | 
+      ( (buf[8] & 0x7f) << 7) | 
+      (buf[9] & 0x7f);
+    unsigned int offset = size + 10;
     if( footer )
       offset += 10;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic