[packages/mp4v2] - updated to 5.0.1 + patch to restore original C API/ABI as soname remains unchanged

qboosh qboosh at pld-linux.org
Sat Jun 20 13:14:45 CEST 2026


commit e8b206044f54857d1e16c89cc05683a5017eee39
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Jun 20 13:15:11 2026 +0200

    - updated to 5.0.1 + patch to restore original C API/ABI as soname remains unchanged

 mp4v2-abi.patch | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 mp4v2-nul.patch | 11 -----------
 mp4v2.spec      | 22 +++++++++++-----------
 3 files changed, 61 insertions(+), 22 deletions(-)
---
diff --git a/mp4v2.spec b/mp4v2.spec
index e595af2..a2e2644 100644
--- a/mp4v2.spec
+++ b/mp4v2.spec
@@ -1,16 +1,16 @@
 Summary:	MP4v2 library provides API for creation and modification of MP4 files
 Summary(pl.UTF-8):	Biblioteka MP4v2 - API do tworzenia i modyfikowania plików MP4
 Name:		mp4v2
-Version:	3.0.4.0
-Release:	3
+Version:	5.0.1
+Release:	1
 License:	MPL v1.1
 Group:		Applications/Multimedia
 #Source0Download: https://github.com/TechSmith/mp4v2/releases
-Source0:	https://github.com/TechSmith/mp4v2/archive/Release-MP4v2-%{version}/%{name}-%{version}.tar.gz
-# Source0-md5:	4055057096e9be03fceaed0170c1b2c0
+Source0:	https://github.com/TechSmith/mp4v2/archive/Release-ThirdParty-MP4v2-%{version}/%{name}-Release-ThirdParty-MP4v2-%{version}.tar.gz
+# Source0-md5:	e56bd6f6016089ee381416162d3b13bb
 Patch0:		%{name}-export.patch
 Patch1:		%{name}-doc.patch
-Patch2:		%{name}-nul.patch
+Patch2:		%{name}-abi.patch
 Patch3:		%{name}-int-overflow.patch
 URL:		https://github.com/TechSmith/mp4v2
 BuildRequires:	help2man
@@ -75,7 +75,7 @@ This package contains static version of MP4v2.
 Ten pakiet zawiera statyczną wersję biblioteki MP4v2.
 
 %prep
-%setup -q -n %{name}-Release-MP4v2-%{version}
+%setup -q -n %{name}-Release-ThirdParty-MP4v2-%{version}
 %patch -P0 -p1
 %patch -P1 -p1
 %patch -P2 -p1
@@ -104,7 +104,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc CHANGES.logging doc/articles/txt/{Authors,Documentation,ReleaseNotes,ToolGuide}.txt
+%doc CHANGES.logging README.md doc/articles/txt/{Authors,Documentation,ReleaseNotes,ToolGuide}.txt
 %attr(755,root,root) %{_bindir}/mp4track
 %attr(755,root,root) %{_bindir}/mp4extract
 %attr(755,root,root) %{_bindir}/mp4trackdump
@@ -121,15 +121,15 @@ rm -rf $RPM_BUILD_ROOT
 
 %files libs
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libmp4v2.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libmp4v2.so.2
+%{_libdir}/libmp4v2.so.*.*.*
+%ghost %{_libdir}/libmp4v2.so.2
 
 %files devel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libmp4v2.so
+%{_libdir}/libmp4v2.so
 %{_libdir}/libmp4v2.la
 %{_includedir}/mp4v2
 
 %files static
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libmp4v2.a
+%{_libdir}/libmp4v2.a
diff --git a/mp4v2-abi.patch b/mp4v2-abi.patch
new file mode 100644
index 0000000..1761730
--- /dev/null
+++ b/mp4v2-abi.patch
@@ -0,0 +1,50 @@
+Preserve ABI from libmp4v2.so.2 by restoring original MP4Read() and moving changed version to new function name.
+Drop the patch when SONAME changes.
+
+--- mp4v2-Release-ThirdParty-MP4v2-5.0.1/src/mp4.cpp.orig	2021-06-30 20:06:32.000000000 +0200
++++ mp4v2-Release-ThirdParty-MP4v2-5.0.1/src/mp4.cpp	2026-06-20 13:09:09.315522637 +0200
+@@ -87,7 +87,7 @@ const char* MP4GetFilename( MP4FileHandl
+ 
+ ///////////////////////////////////////////////////////////////////////////////
+ 
+-MP4FileHandle MP4Read( const char* fileName, ShouldParseAtomCallback cb/*=nullptr*/ )
++MP4FileHandle MP4ReadCb( const char* fileName, ShouldParseAtomCallback cb/*=nullptr*/ )
+ {
+     if (!fileName)
+         return MP4_INVALID_FILE_HANDLE;
+@@ -120,6 +120,11 @@ MP4FileHandle MP4Read( const char* fileN
+     return MP4_INVALID_FILE_HANDLE;
+ }
+ 
++MP4FileHandle MP4Read( const char *fileName)
++{
++    return MP4ReadCb(fileName);
++}
++
+ MP4FileHandle MP4ReadProvider( const char* fileName, const MP4FileProvider* fileProvider )
+ {
+     if (!fileName)
+--- mp4v2-Release-ThirdParty-MP4v2-5.0.1/include/mp4v2/file.h.orig	2026-06-20 13:02:19.201077751 +0200
++++ mp4v2-Release-ThirdParty-MP4v2-5.0.1/include/mp4v2/file.h	2026-06-20 13:03:09.730804007 +0200
+@@ -332,6 +332,10 @@ typedef bool( *ShouldParseAtomCallback )
+ 
+ MP4V2_EXPORT
+ MP4FileHandle MP4Read(
++    const char* fileName );
++
++MP4V2_EXPORT
++MP4FileHandle MP4ReadCb(
+     const char* fileName,
+     ShouldParseAtomCallback cb = nullptr );
+ 
+--- mp4v2-Release-ThirdParty-MP4v2-5.0.1/mp4v2-Win/runner/runner.cpp.orig	2026-06-20 13:03:52.473905781 +0200
++++ mp4v2-Release-ThirdParty-MP4v2-5.0.1/mp4v2-Win/runner/runner.cpp	2026-06-20 13:05:01.080200776 +0200
+@@ -35,7 +35,7 @@ std::vector<MP4TrackId> mp4TrackIdsOfAll
+ int main()
+ {
+    std::string path = "C:\\Users\\d.cheng.TSCCORP\\Desktop\\bugs\\2856 - Crash importing fuzzed MP4\\fuzzed.mp4";
+-   MP4FileHandle fh = MP4Read( path.c_str(), parseAtomCallback );
++   MP4FileHandle fh = MP4ReadCb( path.c_str(), parseAtomCallback );
+ 
+    std::vector<MP4TrackId> videoTrackIds = mp4TrackIdsOfAllVideoTracks( fh );
+    for ( MP4TrackId videoTrackId : videoTrackIds )
diff --git a/mp4v2-nul.patch b/mp4v2-nul.patch
deleted file mode 100644
index 588b34e..0000000
--- a/mp4v2-nul.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- mp4v2-Release-MP4v2-3.0.3.0/src/rtphint.cpp.orig	2017-04-11 17:50:56.000000000 +0200
-+++ mp4v2-Release-MP4v2-3.0.3.0/src/rtphint.cpp	2018-06-16 10:48:21.631875614 +0200
-@@ -339,7 +339,7 @@
-                 pSlash = strchr(pSlash, '/');
-                 if (pSlash != NULL) {
-                     pSlash++;
--                    if (pSlash != '\0') {
-+                    if (*pSlash != '\0') {
-                         length = (uint32_t)strlen(pRtpMap) - (pSlash - pRtpMap);
-                         *ppEncodingParams = (char *)MP4Calloc(length + 1);
-                         strncpy(*ppEncodingParams, pSlash, length);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mp4v2.git/commitdiff/e8b206044f54857d1e16c89cc05683a5017eee39



More information about the pld-cvs-commit mailing list