mirror of
https://github.com/taglib/taglib.git
synced 2025-07-18 21:14:23 -04:00
Skip unknown MP4 boxes (#1231)
This commit is contained in:
BIN
tests/data/nonprintable-atom-type.m4a
Normal file
BIN
tests/data/nonprintable-atom-type.m4a
Normal file
Binary file not shown.
@ -101,6 +101,7 @@ class TestMP4 : public CppUnit::TestFixture
|
||||
CPPUNIT_TEST(testRemoveMetadata);
|
||||
CPPUNIT_TEST(testNonFullMetaAtom);
|
||||
CPPUNIT_TEST(testItemFactory);
|
||||
CPPUNIT_TEST(testNonPrintableAtom);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
@ -847,6 +848,25 @@ public:
|
||||
CPPUNIT_ASSERT_EQUAL(StringList("456"), properties.value("TESTINTEGER"));
|
||||
}
|
||||
}
|
||||
|
||||
void testNonPrintableAtom()
|
||||
{
|
||||
ScopedFileCopy copy("nonprintable-atom-type", ".m4a");
|
||||
{
|
||||
MP4::File f(copy.fileName().c_str());
|
||||
CPPUNIT_ASSERT(f.isValid());
|
||||
CPPUNIT_ASSERT_EQUAL(1, f.audioProperties()->channels());
|
||||
CPPUNIT_ASSERT_EQUAL(32000, f.audioProperties()->sampleRate());
|
||||
f.tag()->setTitle("TITLE");
|
||||
f.save();
|
||||
}
|
||||
{
|
||||
MP4::File f(copy.fileName().c_str());
|
||||
CPPUNIT_ASSERT(f.isValid());
|
||||
CPPUNIT_ASSERT(f.hasMP4Tag());
|
||||
CPPUNIT_ASSERT_EQUAL(String("TITLE"), f.tag()->title());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(TestMP4);
|
||||
|
Reference in New Issue
Block a user