[packages/vlc] - added taglib2 patch (adjust for taglib 2.0.x; should be compatible with 1.13)
qboosh
qboosh at pld-linux.org
Tue May 28 21:31:09 CEST 2024
commit 8292d0b909f36cd973ec258aa6cd0d8cd99a946b
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue May 28 21:21:49 2024 +0200
- added taglib2 patch (adjust for taglib 2.0.x; should be compatible with 1.13)
vlc-taglib2.patch | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
vlc.spec | 2 ++
2 files changed, 92 insertions(+)
---
diff --git a/vlc.spec b/vlc.spec
index 275a7c6..151c199 100644
--- a/vlc.spec
+++ b/vlc.spec
@@ -88,6 +88,7 @@ Patch9: x32.patch
Patch10: %{name}-libplacebo-5.patch
Patch11: opencv4.patch
Patch12: ffmpeg6.patch
+Patch13: %{name}-taglib2.patch
URL: http://www.videolan.org/vlc/
%{?with_decklink:BuildRequires: Blackmagic_DeckLink_SDK}
# 1.0 for X11 or GLESv1, 1.1 for GLESv2
@@ -427,6 +428,7 @@ Akcje klienta VLC dla Solid.
%{?with_libplacebo:%patch10 -p1}
%patch11 -p1
%patch12 -p1
+%patch13 -p1
%build
%{__libtoolize}
diff --git a/vlc-taglib2.patch b/vlc-taglib2.patch
new file mode 100644
index 0000000..29290ea
--- /dev/null
+++ b/vlc-taglib2.patch
@@ -0,0 +1,90 @@
+--- vlc-3.0.20/modules/meta_engine/taglib.cpp.orig 2023-04-23 01:27:28.000000000 +0200
++++ vlc-3.0.20/modules/meta_engine/taglib.cpp 2024-05-28 20:53:38.455427736 +0200
+@@ -57,6 +57,7 @@
+ TAGLIB_PATCH_VERSION)
+
+ #define TAGLIB_VERSION_1_11 VERSION_INT(1,11,0)
++#define TAGLIB_VERSION_2 VERSION_INT(2,0,0)
+
+ #if TAGLIB_VERSION >= TAGLIB_VERSION_1_11
+ #include <tfilestream.h>
+@@ -185,7 +186,7 @@ public:
+ ByteVector res(length, 0);
+ ssize_t i_read = vlc_stream_Read( m_stream, res.data(), length);
+ if (i_read < 0)
+- return ByteVector::null;
++ return ByteVector();
+ else if ((size_t)i_read != length)
+ res.resize(i_read);
+ return res;
+@@ -237,12 +238,20 @@ public:
+ return;
+ }
+
++#if TAGLIB_VERSION >= TAGLIB_VERSION_2
++ offset_t tell() const
++#else
+ long tell() const
++#endif
+ {
+ return m_previousPos;
+ }
+
++#if TAGLIB_VERSION >= TAGLIB_VERSION_2
++ offset_t length()
++#else
+ long length()
++#endif
+ {
+ uint64_t i_size;
+ if (vlc_stream_GetSize( m_stream, &i_size ) != VLC_SUCCESS)
+@@ -465,7 +474,7 @@ static void ReadMetaFromASF( ASF::Tag* t
+ static void ReadMetaFromBasicTag(const Tag* tag, vlc_meta_t *dest)
+ {
+ #define SET( accessor, meta ) \
+- if( !tag->accessor().isNull() && !tag->accessor().isEmpty() ) \
++ if( !tag->accessor().isEmpty() ) \
+ vlc_meta_Set##meta( dest, tag->accessor().toCString(true) )
+ #define SETINT( accessor, meta ) \
+ if( tag->accessor() ) \
+@@ -806,15 +815,15 @@ static void ReadMetaFromMP4( MP4::Tag* t
+ {
+ MP4::Item list;
+ #define SET( keyName, metaName ) \
+- if( tag->itemListMap().contains(keyName) ) \
++ if( tag->contains(keyName) ) \
+ { \
+- list = tag->itemListMap()[keyName]; \
++ list = tag->item(keyName); \
+ vlc_meta_Set##metaName( p_meta, list.toStringList().front().toCString( true ) ); \
+ }
+ #define SET_EXTRA( keyName, metaName ) \
+- if( tag->itemListMap().contains(keyName) ) \
++ if( tag->contains(keyName) ) \
+ { \
+- list = tag->itemListMap()[keyName]; \
++ list = tag->item(keyName); \
+ vlc_meta_AddExtra( p_meta, metaName, list.toStringList().front().toCString( true ) ); \
+ }
+
+@@ -824,9 +833,9 @@ static void ReadMetaFromMP4( MP4::Tag* t
+ #undef SET
+ #undef SET_EXTRA
+
+- if( tag->itemListMap().contains("covr") )
++ if( tag->contains("covr") )
+ {
+- MP4::CoverArtList list = tag->itemListMap()["covr"].toCoverArtList();
++ MP4::CoverArtList list = tag->item("covr").toCoverArtList();
+ const char *psz_format = list[0].format() == MP4::CoverArt::PNG ? "image/png" : "image/jpeg";
+
+ msg_Dbg( p_demux_meta, "Found embedded art (%s) is %i bytes",
+@@ -1337,7 +1346,7 @@ static int WriteMeta( vlc_object_t *p_th
+ if( RIFF::AIFF::File* riff_aiff = dynamic_cast<RIFF::AIFF::File*>(f.file()) )
+ WriteMetaToId3v2( riff_aiff->tag(), p_item );
+ else if( RIFF::WAV::File* riff_wav = dynamic_cast<RIFF::WAV::File*>(f.file()) )
+- WriteMetaToId3v2( riff_wav->tag(), p_item );
++ WriteMetaToId3v2( riff_wav->ID3v2Tag(), p_item );
+ }
+ else if( TrueAudio::File* trueaudio = dynamic_cast<TrueAudio::File*>(f.file()) )
+ {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/vlc.git/commitdiff/8292d0b909f36cd973ec258aa6cd0d8cd99a946b
More information about the pld-cvs-commit
mailing list