[vlc-devel] [PATCH 6/7] contrib: taglib: Allow user defined resolvers to be used with IOStream
Hugo Beauzée-Luyssen
hugo at beauzee.fr
Fri Oct 4 12:00:29 CEST 2019
---
contrib/src/taglib/rules.mak | 1 +
.../src/taglib/use_resolvers_on_streams.patch | 44 +++++++++++++++++++
2 files changed, 45 insertions(+)
create mode 100644 contrib/src/taglib/use_resolvers_on_streams.patch
diff --git a/contrib/src/taglib/rules.mak b/contrib/src/taglib/rules.mak
index c6b4e934f1..ba7db32c5e 100644
--- a/contrib/src/taglib/rules.mak
+++ b/contrib/src/taglib/rules.mak
@@ -18,6 +18,7 @@ taglib: taglib-$(TAGLIB_VERSION).tar.gz .sum-taglib
ifdef HAVE_WINSTORE
$(APPLY) $(SRC)/taglib/unicode.patch
endif
+ $(APPLY) $(SRC)/taglib/use_resolvers_on_streams.patch
$(MOVE)
.taglib: taglib toolchain.cmake
diff --git a/contrib/src/taglib/use_resolvers_on_streams.patch b/contrib/src/taglib/use_resolvers_on_streams.patch
new file mode 100644
index 0000000000..91fa3cd9c6
--- /dev/null
+++ b/contrib/src/taglib/use_resolvers_on_streams.patch
@@ -0,0 +1,44 @@
+From e648e07b7ebc4a1254a8673388c8f578fedf62a6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo at beauzee.fr>
+Date: Mon, 18 Mar 2019 15:57:28 +0100
+Subject: [PATCH] fileref: Use user defined resolvers with IOStream
+
+---
+ taglib/fileref.cpp | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/taglib/fileref.cpp b/taglib/fileref.cpp
+index 3a7f2c65..b0369a0c 100644
+--- a/taglib/fileref.cpp
++++ b/taglib/fileref.cpp
+@@ -88,13 +88,6 @@ namespace
+ return 0;
+ }
+
+- template <>
+- File *resolveFileType<IOStream *>(IOStream *arg, bool readProperties,
+- AudioProperties::ReadStyle style)
+- {
+- return 0;
+- }
+-
+ template <>
+ File *resolveFileType<FileName>(FileName arg, bool readProperties,
+ AudioProperties::ReadStyle style)
+@@ -109,6 +102,13 @@ namespace
+ return 0;
+ }
+
++ template <>
++ File *resolveFileType<IOStream *>(IOStream *arg, bool readProperties,
++ AudioProperties::ReadStyle style)
++ {
++ return resolveFileType(arg->name(), readProperties, style);
++ }
++
+ template <typename T>
+ File* createInternal(T arg, bool readAudioProperties,
+ AudioProperties::ReadStyle audioPropertiesStyle)
+--
+2.20.1
+
--
2.20.1
More information about the vlc-devel
mailing list