16 Commits

Author SHA1 Message Date
Tsuda Kageyu
e36a9cabb9 Update NEWS. 2016-10-24 12:03:23 +09:00
Tsuda Kageyu
597dcde72a Update the version to v1.11.1. 2016-10-22 02:45:52 +09:00
Tsuda Kageyu
6a96a6426a Replace a possibly non-free file in the test suite. 2016-10-22 02:11:16 +09:00
Tsuda Kageyu
69c65284a5 Update NEWS. 2016-10-22 01:06:57 +09:00
Tsuda Kageyu
97aaa0f979 Restore the ABI breakage by bringing back a removed private static variable. 2016-10-19 15:57:28 +09:00
Tsuda Kageyu
0dac721ce2 Update NEWS. 2016-09-26 17:48:44 +09:00
Stephen F. Booth
bbeeca6fdb Merge pull request #754 from hyperquantum/master
Fix defect in ByteVectorStream::seek when Position==End.
2016-09-15 21:11:08 -04:00
Kevin André
7e90313690 Fix defect in ByteVectorStream::seek when Position==End. 2016-09-15 16:30:16 +02:00
Tsuda Kageyu
1d3c95f692 Merge pull request #752 from evpobr/cmake-ver
Move cmake_minimum_required at the top
2016-09-12 15:56:45 +09:00
Tsuda Kageyu
8c3801f18d Merge pull request #753 from FestusHagen/fh1.m_AddBuildSharedLibsOption
Add BUILD_SHARED_LIBS option for CMake GUI.
2016-09-12 15:56:33 +09:00
Festus Hagen
c9bdd416ef Add BUILD_SHARED_LIBS option for CMake GUI. 2016-08-25 15:03:44 -04:00
evpobr
9f28e037fe Move cmake_minimum_required at the top 2016-08-20 22:37:53 +05:00
Stephen F. Booth
92c070ba9e Merge pull request #749 from jwelton/fix-typo
Fix Typo
2016-08-14 17:10:18 -04:00
Jake Welton
75e3ec73aa Change string to end offset 2016-08-14 22:02:33 +01:00
Tsuda Kageyu
3e47a036fb Update NEWS. 2016-05-14 10:46:42 +09:00
Tsuda Kageyu
9b995544e4 Fix reading table of contents frames with a lot of children. 2016-05-14 09:58:19 +09:00
12 changed files with 52 additions and 10 deletions

View File

@@ -1,7 +1,7 @@
project(taglib)
cmake_minimum_required(VERSION 2.8.0 FATAL_ERROR)
project(taglib)
if(NOT ${CMAKE_VERSION} VERSION_LESS 2.8.12)
cmake_policy(SET CMP0022 OLD)
endif()
@@ -12,6 +12,7 @@ if(DEFINED ENABLE_STATIC)
message(FATAL_ERROR "This option is no longer available, use BUILD_SHARED_LIBS instead")
endif()
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
if(NOT BUILD_SHARED_LIBS)
add_definitions(-DTAGLIB_STATIC)
endif()
@@ -89,9 +90,9 @@ endif()
# 2. If any interfaces have been added, removed, or changed since the last update, increment current, and set revision to 0.
# 3. If any interfaces have been added since the last public release, then increment age.
# 4. If any interfaces have been removed since the last public release, then set age to 0.
set(TAGLIB_SOVERSION_CURRENT 17)
set(TAGLIB_SOVERSION_CURRENT 18)
set(TAGLIB_SOVERSION_REVISION 0)
set(TAGLIB_SOVERSION_AGE 16)
set(TAGLIB_SOVERSION_AGE 17)
math(EXPR TAGLIB_SOVERSION_MAJOR "${TAGLIB_SOVERSION_CURRENT} - ${TAGLIB_SOVERSION_AGE}")
math(EXPR TAGLIB_SOVERSION_MINOR "${TAGLIB_SOVERSION_AGE}")

7
NEWS
View File

@@ -1,3 +1,10 @@
TagLib 1.11.1 (Oct 24, 2016)
============================
* Fixed binary incompatible change in TagLib::String.
* Fixed reading ID3v2 CTOC frames with a lot of entries.
* Fixed seeking ByteVectorStream from the end.
TagLib 1.11 (Apr 29, 2016)
==========================

View File

@@ -198,7 +198,7 @@ String ChapterFrame::toString() const
s += ", start offset: " + String::number(d->startOffset);
if(d->endOffset != 0xFFFFFFFF)
s += ", start offset: " + String::number(d->endOffset);
s += ", end offset: " + String::number(d->endOffset);
if(!d->embeddedFrameList.isEmpty()) {
StringList frameIDs;

View File

@@ -272,9 +272,9 @@ void TableOfContentsFrame::parseFields(const ByteVector &data)
int pos = 0;
unsigned int embPos = 0;
d->elementID = readStringField(data, String::Latin1, &pos).data(String::Latin1);
d->isTopLevel = (data.at(pos) & 2) > 0;
d->isOrdered = (data.at(pos++) & 1) > 0;
unsigned int entryCount = data.at(pos++);
d->isTopLevel = (data.at(pos) & 2) != 0;
d->isOrdered = (data.at(pos++) & 1) != 0;
unsigned int entryCount = static_cast<unsigned char>(data.at(pos++));
for(unsigned int i = 0; i < entryCount; i++) {
ByteVector childElementID = readStringField(data, String::Latin1, &pos).data(String::Latin1);
d->childElements.append(childElementID);

View File

@@ -30,7 +30,7 @@
#define TAGLIB_MAJOR_VERSION 1
#define TAGLIB_MINOR_VERSION 11
#define TAGLIB_PATCH_VERSION 0
#define TAGLIB_PATCH_VERSION 1
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 1)) || defined(__clang__)
#define TAGLIB_IGNORE_MISSING_DESTRUCTOR _Pragma("GCC diagnostic ignored \"-Wnon-virtual-dtor\"")

View File

@@ -137,7 +137,7 @@ void ByteVectorStream::seek(long offset, Position p)
d->position += offset;
break;
case End:
d->position = length() - offset;
d->position = length() + offset; // offset is expected to be negative
break;
}
}

View File

@@ -787,6 +787,12 @@ void String::detach()
if(d->count() > 1)
String(d->data.c_str()).swap(*this);
}
////////////////////////////////////////////////////////////////////////////////
// private members
////////////////////////////////////////////////////////////////////////////////
const String::Type String::WCharByteOrder = wcharByteOrder();
}
////////////////////////////////////////////////////////////////////////////////

View File

@@ -536,6 +536,13 @@ namespace TagLib {
void detach();
private:
/*!
* \deprecated This variable is no longer used, but NEVER remove this. It
* may lead to a linkage error.
*/
// BIC: remove
static const Type WCharByteOrder;
class StringPrivate;
StringPrivate *d;
};

Binary file not shown.

Binary file not shown.

View File

@@ -38,6 +38,7 @@ class TestByteVectorStream : public CppUnit::TestFixture
CPPUNIT_TEST(testReadBlock);
CPPUNIT_TEST(testRemoveBlock);
CPPUNIT_TEST(testInsert);
CPPUNIT_TEST(testSeekEnd);
CPPUNIT_TEST_SUITE_END();
public:
@@ -112,6 +113,19 @@ public:
CPPUNIT_ASSERT_EQUAL(ByteVector("yyx123foa"), *stream.data());
}
void testSeekEnd()
{
ByteVector v("abcdefghijklmnopqrstuvwxyz");
ByteVectorStream stream(v);
CPPUNIT_ASSERT_EQUAL(26L, stream.length());
stream.seek(-4, IOStream::End);
CPPUNIT_ASSERT_EQUAL(ByteVector("w"), stream.readBlock(1));
stream.seek(-25, IOStream::End);
CPPUNIT_ASSERT_EQUAL(ByteVector("b"), stream.readBlock(1));
}
};
CPPUNIT_TEST_SUITE_REGISTRATION(TestByteVectorStream);

View File

@@ -118,6 +118,7 @@ class TestID3v2 : public CppUnit::TestFixture
CPPUNIT_TEST(testShrinkPadding);
CPPUNIT_TEST(testEmptyFrame);
CPPUNIT_TEST(testDuplicateTags);
CPPUNIT_TEST(testParseTOCFrameWithManyChildren);
CPPUNIT_TEST_SUITE_END();
public:
@@ -1217,6 +1218,12 @@ public:
}
}
void testParseTOCFrameWithManyChildren()
{
MPEG::File f(TEST_FILE_PATH_C("toc_many_children.mp3"));
CPPUNIT_ASSERT(f.isValid());
}
};
CPPUNIT_TEST_SUITE_REGISTRATION(TestID3v2);