[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: [Bug 141680] Handling of ID3v2.3 text frames
From: Scott Wheeler <wheeler () kde ! org>
Date: 2007-04-01 22:08:58
Message-ID: 20070401220858.18974.qmail () ktown ! kde ! org
[Download RAW message or body]
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
http://bugs.kde.org/show_bug.cgi?id=141680
wheeler kde org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
------- Additional Comments From wheeler kde org 2007-04-02 00:08 -------
SVN commit 649032 by wheeler:
Strip nulls from the end of ID3v2 text fields.
Simplified version of the patch from Xavier Duret.
BUG:141680
M +11 -1 textidentificationframe.cpp
--- trunk/kdesupport/taglib/taglib/mpeg/id3v2/frames/textidentificationframe.cpp \
#649031:649032 @ -108,8 +108,18 @
int byteAlign = d->textEncoding == String::Latin1 || d->textEncoding == \
String::UTF8 ? 1 : 2;
- ByteVectorList l = ByteVectorList::split(data.mid(1), \
textDelimiter(d->textEncoding), byteAlign); + // build a small counter to strip nulls \
off the end of the field
+ int dataLength = data.size() - 1;
+
+ while(dataLength > 0 && data[dataLength] == 0)
+ dataLength--;
+
+ while(dataLength % byteAlign != 0)
+ dataLength++;
+
+ ByteVectorList l = ByteVectorList::split(data.mid(1, dataLength), \
textDelimiter(d->textEncoding), byteAlign); +
d->fieldList.clear();
// append those split values to the list and make sure that the new string's
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic