diff --git a/tests/data/nonprintable-atom-type.m4a b/tests/data/nonprintable-atom-type.m4a new file mode 100644 index 00000000..bf7858a0 Binary files /dev/null and b/tests/data/nonprintable-atom-type.m4a differ diff --git a/tests/test_mp4.cpp b/tests/test_mp4.cpp index c37e4e04..e5b4ece6 100644 --- a/tests/test_mp4.cpp +++ b/tests/test_mp4.cpp @@ -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,17 @@ 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()); + } + } }; CPPUNIT_TEST_SUITE_REGISTRATION(TestMP4);