[PATCH] Remove trailing spaces from ID3v1 tag strings
Xavier Duret
xaviour.maillists at gmail.com
Tue Jan 16 20:01:19 CET 2007
It seams that there is a quite popular encoder that generate ID3v1
frames with trailing spaces instead of using NULL terminated strings.
This patch should be binary compatible.
diff -ruN taglib/mpeg/id3v1/id3v1tag.cpp.old taglib/mpeg/id3v1/id3v1tag.cpp
--- taglib/mpeg/id3v1/id3v1tag.cpp.old 2007-01-12 14:21:17.000000000 +0100
+++ taglib/mpeg/id3v1/id3v1tag.cpp 2007-01-15 18:46:31.000000000 +0100
@@ -55,7 +55,7 @@
String ID3v1::StringHandler::parse(const ByteVector &data) const
{
- return String(data, String::Latin1);
+ return String(data, String::Latin1).stripWhiteSpace();
}
ByteVector ID3v1::StringHandler::render(const String &s) const
More information about the taglib-devel
mailing list