qmmp: patch for taglib 2

This commit is contained in:
classabbyamp 2025-05-20 20:59:00 -04:00
parent 3c53d8fa94
commit e6b67b08d1
No known key found for this signature in database
GPG key ID: 6BE0755918A4C7F5

View file

@ -0,0 +1,44 @@
source: https://sourceforge.net/p/qmmp-dev/code/12168/tree//trunk/qmmp/src/plugins/Input/archive/archivetagreader.cpp?diff=5509cf2ad46bb41b66f44d6c:12167
--- a/src/plugins/Input/archive/archivetagreader.cpp
+++ b/src/plugins/Input/archive/archivetagreader.cpp
@@ -79,7 +79,11 @@
{
return m_input->isOpen();
}
+#if TAGLIB_MAJOR_VERSION >= 2
+ virtual void seek(TagLib::offset_t offset, Position p = Beginning) override
+#else
virtual void seek(long offset, Position p = Beginning) override
+#endif
{
switch (p)
{
@@ -99,15 +103,27 @@
m_input->seek(0);
TagLib::IOStream::clear();
}
+#if TAGLIB_MAJOR_VERSION >= 2
+ virtual TagLib::offset_t tell() const override
+#else
virtual long tell() const override
+#endif
{
return m_input->pos();
}
+#if TAGLIB_MAJOR_VERSION >= 2
+ virtual TagLib::offset_t length() override
+#else
virtual long length() override
+#endif
{
return m_input->size();
}
+#if TAGLIB_MAJOR_VERSION >= 2
+ virtual void truncate(TagLib::offset_t) override
+#else
virtual void truncate(long) override
+#endif
{}
private: