aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRudi Heitbaum <rudi@heitbaum.com>2024-01-25 11:53:52 +0000
committerMarkus Härer <markus.haerer@gmx.net>2024-02-26 01:59:28 +0100
commit03a8904bd87dbe1859fe0c7edabf46a295cca64e (patch)
treeb9b54a515952f4c332bcb61ac3486fdec3387764
parentcd9b7642cf356ce1cb2903ee8676c68eac9cd692 (diff)
TagLoaderTagLib: dont use deprecated integer types to support taglib-20
final release of taglib-2.0 removed deprecated unused types from taglib. ref: - https://github.com/taglib/taglib/commit/a08acdcf23c5d4ac4cb795f5edfdc539055138b7 - These integer types are deprecated. Do not use them. Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com> (cherry picked from commit e43460c54a13b2dda68e9a905c8ddea848d800e5)
-rw-r--r--xbmc/music/tags/TagLoaderTagLib.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/xbmc/music/tags/TagLoaderTagLib.cpp b/xbmc/music/tags/TagLoaderTagLib.cpp
index c1b36318b2..f4f676067a 100644
--- a/xbmc/music/tags/TagLoaderTagLib.cpp
+++ b/xbmc/music/tags/TagLoaderTagLib.cpp
@@ -472,7 +472,11 @@ bool CTagLoaderTagLib::ParseTag(ID3v2::Tag *id3v2, EmbeddedArt *art, MUSIC_INFO:
if (picture)
{
std::string mime = picture->mimeType().to8Bit(true);
+#if (TAGLIB_MAJOR_VERSION >= 2)
+ unsigned int size = picture->picture().size();
+#else
TagLib::uint size = picture->picture().size();
+#endif
tag.SetCoverArtInfo(size, mime);
if (art)
art->Set(reinterpret_cast<const uint8_t*>(picture->picture().data()), size, mime);
@@ -789,7 +793,11 @@ bool CTagLoaderTagLib::ParseTag(Ogg::XiphComment *xiph, EmbeddedArt *art, CMusic
std::string mime = pictures[i].mimeType().toCString();
if (mime.compare(0, 6, "image/") != 0)
continue;
+#if (TAGLIB_MAJOR_VERSION >= 2)
+ unsigned int size = pictures[i].data().size();
+#else
TagLib::uint size = pictures[i].data().size();
+#endif
tag.SetCoverArtInfo(size, mime);
if (art)
art->Set(reinterpret_cast<const uint8_t*>(pictures[i].data().data()), size, mime);