pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/multimedia/mp4v2 mp4v2: Revert amazing upstream commit...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d54a046befd6
branches:  trunk
changeset: 443746:d54a046befd6
user:      nia <nia%pkgsrc.org@localhost>
date:      Sun Dec 20 13:07:58 2020 +0000

description:
mp4v2: Revert amazing upstream commit that breaks all C users of libmp4v2

Bump PKGREVISION

diffstat:

 multimedia/mp4v2/Makefile                           |   3 +-
 multimedia/mp4v2/distinfo                           |   5 +-
 multimedia/mp4v2/patches/patch-include_mp4v2_file.h |  38 +++++++++++++
 multimedia/mp4v2/patches/patch-src_mp4.cpp          |  60 +++++++++++++++++++++
 multimedia/mp4v2/patches/patch-src_mp4atom.cpp      |  19 ++++++
 5 files changed, 123 insertions(+), 2 deletions(-)

diffs (156 lines):

diff -r 76b73a164a37 -r d54a046befd6 multimedia/mp4v2/Makefile
--- a/multimedia/mp4v2/Makefile Sun Dec 20 13:05:26 2020 +0000
+++ b/multimedia/mp4v2/Makefile Sun Dec 20 13:07:58 2020 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.7 2020/12/17 09:14:00 triaxx Exp $
+# $NetBSD: Makefile,v 1.8 2020/12/20 13:07:58 nia Exp $
 
 DISTNAME=      mp4v2-4.1.5
+PKGREVISION=   1
 CATEGORIES=    multimedia
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=TechSmith/}
 GITHUB_TAG=    Release-ThirdParty-MP4v2-${PKGVERSION_NOREV}
diff -r 76b73a164a37 -r d54a046befd6 multimedia/mp4v2/distinfo
--- a/multimedia/mp4v2/distinfo Sun Dec 20 13:05:26 2020 +0000
+++ b/multimedia/mp4v2/distinfo Sun Dec 20 13:07:58 2020 +0000
@@ -1,7 +1,10 @@
-$NetBSD: distinfo,v 1.5 2020/12/17 09:14:00 triaxx Exp $
+$NetBSD: distinfo,v 1.6 2020/12/20 13:07:58 nia Exp $
 
 SHA1 (mp4v2-4.1.5.tar.gz) = a57fb90b4d14b240f90431ba06c450283e0f9d28
 RMD160 (mp4v2-4.1.5.tar.gz) = 58b1b4de372499505447e6854cfe1214881bf813
 SHA512 (mp4v2-4.1.5.tar.gz) = 593071e3e2d48a7bc704d4b32b28de300363d797236cf8904b3c403758fa08fcd9c0a1ebafc462f69d3964493515eeb391e23d5e27366e06c8d65f68c936b65a
 Size (mp4v2-4.1.5.tar.gz) = 2681905 bytes
+SHA1 (patch-include_mp4v2_file.h) = bfb8ed37208a1e04c2cb2ca4a8409e4b2b274065
+SHA1 (patch-src_mp4.cpp) = 53435290d3f3fd9ecc552357f674c54f5c6ec98d
+SHA1 (patch-src_mp4atom.cpp) = 78a6dce747a8c5cc73f231fa9b81d116b51cf4bb
 SHA1 (patch-src_rtphint.cpp) = 7ccbacb6873a410b6e8b0d376a2ae7ada1c022d5
diff -r 76b73a164a37 -r d54a046befd6 multimedia/mp4v2/patches/patch-include_mp4v2_file.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/multimedia/mp4v2/patches/patch-include_mp4v2_file.h       Sun Dec 20 13:07:58 2020 +0000
@@ -0,0 +1,38 @@
+$NetBSD: patch-include_mp4v2_file.h,v 1.1 2020/12/20 13:07:58 nia Exp $
+
+Fix building C applications.
+
+Reverts the following commit:
+https://github.com/TechSmith/mp4v2/commit/263719465a1c1fbe6d240b8d154da71003ce3230
+https://github.com/TechSmith/mp4v2/issues/47
+
+--- include/mp4v2/file.h.orig  2020-12-07 23:16:32.000000000 +0000
++++ include/mp4v2/file.h
+@@ -328,12 +328,9 @@ bool MP4Optimize(
+  *      the library.
+  *      On error, #MP4_INVALID_FILE_HANDLE.
+  */
+-typedef bool( *ShouldParseAtomCallback )( uint32_t );
+-
+ MP4V2_EXPORT
+ MP4FileHandle MP4Read(
+-    const char* fileName,
+-    ShouldParseAtomCallback cb = nullptr );
++    const char* fileName );
+ 
+ /** Read an existing mp4 file.
+  *
+@@ -361,6 +358,13 @@ MP4FileHandle MP4ReadProvider(
+     const char*            fileName,
+     const MP4FileProvider* fileProvider DEFAULT(NULL) );
+ 
++typedef bool( *ShouldParseAtomCallback )( uint32_t );
++MP4V2_EXPORT
++void MP4SetShouldParseAtomCallback(
++   MP4FileHandle hFile,
++   ShouldParseAtomCallback f
++);
++
+ /** @} ***********************************************************************/
+ 
+ #endif /* MP4V2_FILE_H */
diff -r 76b73a164a37 -r d54a046befd6 multimedia/mp4v2/patches/patch-src_mp4.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/multimedia/mp4v2/patches/patch-src_mp4.cpp        Sun Dec 20 13:07:58 2020 +0000
@@ -0,0 +1,60 @@
+$NetBSD: patch-src_mp4.cpp,v 1.1 2020/12/20 13:07:58 nia Exp $
+
+Fix building C applications.
+
+Reverts the following commit:
+https://github.com/TechSmith/mp4v2/commit/263719465a1c1fbe6d240b8d154da71003ce3230
+https://github.com/TechSmith/mp4v2/issues/47
+
+--- src/mp4.cpp.orig   2020-12-07 23:16:32.000000000 +0000
++++ src/mp4.cpp
+@@ -87,7 +87,7 @@ const char* MP4GetFilename( MP4FileHandl
+ 
+ ///////////////////////////////////////////////////////////////////////////////
+ 
+-MP4FileHandle MP4Read( const char* fileName, ShouldParseAtomCallback cb/*=nullptr*/ )
++MP4FileHandle MP4Read( const char* fileName )
+ {
+     if (!fileName)
+         return MP4_INVALID_FILE_HANDLE;
+@@ -100,9 +100,6 @@ MP4FileHandle MP4Read( const char* fileN
+     {
+         ASSERT(pFile);
+ 
+-        if ( cb != nullptr )
+-           pFile->SetShouldParseAtomCallback( cb );
+-
+         pFile->Read( fileName, NULL );
+         return (MP4FileHandle)pFile;
+     }
+@@ -149,6 +146,30 @@ MP4FileHandle MP4ReadProvider( const cha
+ 
+ ///////////////////////////////////////////////////////////////////////////////
+ 
++void MP4SetShouldParseAtomCallback( MP4FileHandle hFile, ShouldParseAtomCallback cb )
++{
++   if (!MP4_IS_VALID_FILE_HANDLE(hFile))
++      return;
++   try
++   {
++      ASSERT(hFile);
++      MP4File& file = *static_cast<MP4File*>(hFile);
++      file.SetShouldParseAtomCallback( cb );
++   }
++   catch( Exception* x ) {
++      mp4v2::impl::log.errorf(*x);
++      delete x;
++   }
++   catch( ... ) {
++      mp4v2::impl::log.errorf("%s: unknown exception accessing MP4File "
++                               "filename", __FUNCTION__ );
++   }
++
++//   g_parseCallback = cb;
++}
++
++///////////////////////////////////////////////////////////////////////////////
++
+     MP4FileHandle MP4Create (const char* fileName,
+                              uint32_t  flags)
+     {
diff -r 76b73a164a37 -r d54a046befd6 multimedia/mp4v2/patches/patch-src_mp4atom.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/multimedia/mp4v2/patches/patch-src_mp4atom.cpp    Sun Dec 20 13:07:58 2020 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-src_mp4atom.cpp,v 1.1 2020/12/20 13:07:58 nia Exp $
+
+Fix building C applications.
+
+Reverts the following commit:
+https://github.com/TechSmith/mp4v2/commit/263719465a1c1fbe6d240b8d154da71003ce3230
+https://github.com/TechSmith/mp4v2/issues/47
+
+--- src/mp4atom.cpp.orig       2020-12-07 23:16:32.000000000 +0000
++++ src/mp4atom.cpp
+@@ -237,7 +237,7 @@ void MP4Atom::Read()
+ 
+     // skip parsing of certain atoms
+     ShouldParseAtomCallback cb = m_File.GetShouldParseAtomCallback();
+-    if ( cb == nullptr || cb( ATOMID(m_type) ) )
++    if ( cb == nullptr || ( cb != nullptr && cb( ATOMID(m_type) ) ) )
+     {
+        ReadProperties();
+ 



Home | Main Index | Thread Index | Old Index