* Fixed a failing test on ppc64.
* Support for binary 'covr' atom in MP4 files. TagLib 1.6 treated them
as text atoms, which corrupted them in some cases.
+ * Fixed ID3v1-style genre to string conversion in MP4 files.
TagLib 1.6
==========
ByteVectorList data = parseData(atom, file);
if(data.size()) {
int idx = (int)data[0].toShort();
- if(!d->items.contains("\251gen")) {
- d->items.insert("\251gen", StringList(ID3v1::genre(idx)));
+ if(!d->items.contains("\251gen") && idx > 0) {
+ d->items.insert("\251gen", StringList(ID3v1::genre(idx - 1)));
}
}
}
CPPUNIT_TEST(testUpdateStco);
CPPUNIT_TEST(testSaveExisingWhenIlstIsLast);
CPPUNIT_TEST(test64BitAtom);
+ CPPUNIT_TEST(testGnre);
CPPUNIT_TEST(testCovrRead);
CPPUNIT_TEST(testCovrWrite);
CPPUNIT_TEST_SUITE_END();
deleteFile(filename);
}
+ void testGnre()
+ {
+ MP4::File *f = new MP4::File("data/gnre.m4a");
+ CPPUNIT_ASSERT_EQUAL(TagLib::String("Ska"), f->tag()->genre());
+ }
+
void testCovrRead()
{
MP4::File *f = new MP4::File("data/has-tags.m4a");