[vlc-commits] [Git][videolan/vlc][3.0.x] contrib: Bump taglib to 1.12

Hugo Beauzée-Luyssen (@chouquette) gitlab at videolan.org
Fri Nov 26 16:59:48 UTC 2021



Hugo Beauzée-Luyssen pushed to branch 3.0.x at VideoLAN / VLC


Commits:
1353e526 by Hugo Beauzée-Luyssen at 2021-11-26T16:10:09+00:00
contrib: Bump taglib to 1.12

fix #26309

(cherry picked from commit c651b10d33dc0fb7b9670208f93f94f850ba8ca4)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

- - - - -


6 changed files:

- − contrib/src/taglib/0001-use-SetFilePointerEx-instead-of-SetFilePointer.patch
- − contrib/src/taglib/0002-use-GetFileInformationByHandleEx-on-newer-builds-of-.patch
- − contrib/src/taglib/0003-don-t-use-CreateFile-in-UWP-builds.patch
- contrib/src/taglib/SHA512SUMS
- contrib/src/taglib/rules.mak
- − contrib/src/taglib/use_resolvers_on_streams.patch


Changes:

=====================================
contrib/src/taglib/0001-use-SetFilePointerEx-instead-of-SetFilePointer.patch deleted
=====================================
@@ -1,40 +0,0 @@
-From d27cc3568c2c04e86a8ec6e29fcdf7e3814b0596 Mon Sep 17 00:00:00 2001
-From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Fri, 15 May 2020 09:25:40 +0200
-Subject: [PATCH 1/3] use SetFilePointerEx instead of SetFilePointer
-
-It's available on more Win10 versions with UCRT builds and provides the same
-features. The API is available since Windows XP.
----
- taglib/toolkit/tfilestream.cpp | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/taglib/toolkit/tfilestream.cpp b/taglib/toolkit/tfilestream.cpp
-index 5205bae0..4b448271 100644
---- a/taglib/toolkit/tfilestream.cpp
-+++ b/taglib/toolkit/tfilestream.cpp
-@@ -364,7 +364,9 @@ void FileStream::seek(long offset, Position p)
-   }
- 
-   SetLastError(NO_ERROR);
--  SetFilePointer(d->file, offset, NULL, whence);
-+  LARGE_INTEGER lOffset;
-+  lOffset.QuadPart = offset;
-+  SetFilePointerEx(d->file, lOffset, NULL, whence);
- 
-   const int lastError = GetLastError();
-   if(lastError != NO_ERROR && lastError != ERROR_NEGATIVE_SEEK)
-@@ -411,7 +413,9 @@ long FileStream::tell() const
- #ifdef _WIN32
- 
-   SetLastError(NO_ERROR);
--  const DWORD position = SetFilePointer(d->file, 0, NULL, FILE_CURRENT);
-+  LARGE_INTEGER lOffset;
-+  lOffset.QuadPart = 0;
-+  const DWORD position = SetFilePointerEx(d->file, lOffset, NULL, FILE_CURRENT);
-   if(GetLastError() == NO_ERROR) {
-     return static_cast<long>(position);
-   }
--- 
-2.26.0.windows.1
-


=====================================
contrib/src/taglib/0002-use-GetFileInformationByHandleEx-on-newer-builds-of-.patch deleted
=====================================
@@ -1,39 +0,0 @@
-From 9c02a2c245bed1d70dbd80b0e63abbcdecb74761 Mon Sep 17 00:00:00 2001
-From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Fri, 15 May 2020 09:29:55 +0200
-Subject: [PATCH 2/3] use GetFileInformationByHandleEx on newer builds of
- Windows
-
-It's available since Vista and UWP builds that don't have GetFileSize.
-
-See https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis
----
- taglib/toolkit/tfilestream.cpp | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/taglib/toolkit/tfilestream.cpp b/taglib/toolkit/tfilestream.cpp
-index 4b448271..ad4443ea 100644
---- a/taglib/toolkit/tfilestream.cpp
-+++ b/taglib/toolkit/tfilestream.cpp
-@@ -441,10 +441,18 @@ long FileStream::length()
- #ifdef _WIN32
- 
-   SetLastError(NO_ERROR);
-+#if _WIN32_WINNT < _WIN32_WINNT_VISTA
-   const DWORD fileSize = GetFileSize(d->file, NULL);
-   if(GetLastError() == NO_ERROR) {
-     return static_cast<long>(fileSize);
-   }
-+#else // _WIN32_WINNT_VISTA
-+  FILE_STANDARD_INFO fStdInfo;
-+  BOOL success = GetFileInformationByHandleEx(d->file, FileStandardInfo, (LPVOID)&fStdInfo, sizeof(FILE_STANDARD_INFO));
-+  if(success) {
-+    return static_cast<long>(fStdInfo.EndOfFile.LowPart);
-+  }
-+#endif // _WIN32_WINNT_VISTA
-   else {
-     debug("FileStream::length() -- Failed to get the file size.");
-     return 0;
--- 
-2.26.0.windows.1
-


=====================================
contrib/src/taglib/0003-don-t-use-CreateFile-in-UWP-builds.patch deleted
=====================================
@@ -1,43 +0,0 @@
-From a9024bd18ce20653616e04702b5e220de56b6b2c Mon Sep 17 00:00:00 2001
-From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Fri, 15 May 2020 09:32:21 +0200
-Subject: [PATCH 3/3] don't use CreateFile in UWP builds
-
-CreateFile2 is available for such builds with more internal restrictions..
-
-See https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis
-https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfile2
----
- taglib/toolkit/tfilestream.cpp | 13 +++++++++++++
- 1 file changed, 13 insertions(+)
-
-diff --git a/taglib/toolkit/tfilestream.cpp b/taglib/toolkit/tfilestream.cpp
-index ad4443ea..10cd8d56 100644
---- a/taglib/toolkit/tfilestream.cpp
-+++ b/taglib/toolkit/tfilestream.cpp
-@@ -52,9 +52,22 @@ namespace
-     const DWORD access = readOnly ? GENERIC_READ : (GENERIC_READ | GENERIC_WRITE);
- 
-     if(!path.wstr().empty())
-+#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
-+    {
-+      CREATEFILE2_EXTENDED_PARAMETERS createExParams;
-+      createExParams.dwSize = sizeof(createExParams);
-+      createExParams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL;
-+      createExParams.dwFileFlags = 0;
-+      createExParams.dwSecurityQosFlags = 0;
-+      createExParams.lpSecurityAttributes = NULL;
-+      createExParams.hTemplateFile = NULL;
-+      return CreateFile2(path.wstr().c_str(), access, FILE_SHARE_READ, OPEN_EXISTING, &createExParams);
-+    }
-+#else // WINAPI_PARTITION_DESKTOP
-       return CreateFileW(path.wstr().c_str(), access, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
-     else if(!path.str().empty())
-       return CreateFileA(path.str().c_str(), access, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
-+#endif // WINAPI_PARTITION_DESKTOP
-     else
-       return InvalidFileHandle;
-   }
--- 
-2.26.0.windows.1
-


=====================================
contrib/src/taglib/SHA512SUMS
=====================================
@@ -1 +1 @@
-7846775c4954ea948fe4383e514ba7c11f55d038ee06b6ea5a0a1c1069044b348026e76b27aa4ba1c71539aa8143e1401fab39184cc6e915ba0ae2c06133cb98  taglib-1.11.1.tar.gz
+7e369faa5e3c6c6401052b7a19e35b0cf8c1e5ed9597053ac731a7718791d5d4803d1b18a93e903ec8c3fc6cb92e34d9616daa2ae4d326965d4c4d5624dcdaba  taglib-1.12.tar.gz


=====================================
contrib/src/taglib/rules.mak
=====================================
@@ -1,7 +1,7 @@
 # TagLib
 
-TAGLIB_VERSION := 1.11.1
-TAGLIB_URL := http://taglib.github.io/releases/taglib-$(TAGLIB_VERSION).tar.gz
+TAGLIB_VERSION := 1.12
+TAGLIB_URL := https://taglib.org/releases/taglib-$(TAGLIB_VERSION).tar.gz
 
 PKGS += taglib
 ifeq ($(call need_pkg,"taglib >= 1.9"),)
@@ -15,10 +15,6 @@ $(TARBALLS)/taglib-$(TAGLIB_VERSION).tar.gz:
 
 taglib: taglib-$(TAGLIB_VERSION).tar.gz .sum-taglib
 	$(UNPACK)
-	$(APPLY) $(SRC)/taglib/0001-use-SetFilePointerEx-instead-of-SetFilePointer.patch
-	$(APPLY) $(SRC)/taglib/0002-use-GetFileInformationByHandleEx-on-newer-builds-of-.patch
-	$(APPLY) $(SRC)/taglib/0003-don-t-use-CreateFile-in-UWP-builds.patch
-	$(APPLY) $(SRC)/taglib/use_resolvers_on_streams.patch
 	$(MOVE)
 
 .taglib: taglib toolchain.cmake


=====================================
contrib/src/taglib/use_resolvers_on_streams.patch deleted
=====================================
@@ -1,44 +0,0 @@
-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
-



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/1353e52693d8deb4e629e153d9c73d7dc69afc13

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/1353e52693d8deb4e629e153d9c73d7dc69afc13
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list