diff options
author | nia <nia@pkgsrc.org> | 2020-12-20 13:07:58 +0000 |
---|---|---|
committer | nia <nia@pkgsrc.org> | 2020-12-20 13:07:58 +0000 |
commit | 1f3b2e67ede0dbd4bbb9fb269a92494c431518d4 (patch) | |
tree | c5976bb7c193d9f90c6c025350769a5bd3454f9a /multimedia/mp4v2 | |
parent | 6ec828a7fae6cfd070680e7f089c691aa99b1410 (diff) | |
download | pkgsrc-1f3b2e67ede0dbd4bbb9fb269a92494c431518d4.tar.gz |
mp4v2: Revert amazing upstream commit that breaks all C users of libmp4v2
Bump PKGREVISION
Diffstat (limited to 'multimedia/mp4v2')
-rw-r--r-- | multimedia/mp4v2/Makefile | 3 | ||||
-rw-r--r-- | multimedia/mp4v2/distinfo | 5 | ||||
-rw-r--r-- | multimedia/mp4v2/patches/patch-include_mp4v2_file.h | 38 | ||||
-rw-r--r-- | multimedia/mp4v2/patches/patch-src_mp4.cpp | 60 | ||||
-rw-r--r-- | multimedia/mp4v2/patches/patch-src_mp4atom.cpp | 19 |
5 files changed, 123 insertions, 2 deletions
diff --git a/multimedia/mp4v2/Makefile b/multimedia/mp4v2/Makefile index 2f80d1baca0..6eb45f85885 100644 --- a/multimedia/mp4v2/Makefile +++ b/multimedia/mp4v2/Makefile @@ -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 --git a/multimedia/mp4v2/distinfo b/multimedia/mp4v2/distinfo index bc85fdffbc0..b47b76aebfc 100644 --- a/multimedia/mp4v2/distinfo +++ b/multimedia/mp4v2/distinfo @@ -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 --git a/multimedia/mp4v2/patches/patch-include_mp4v2_file.h b/multimedia/mp4v2/patches/patch-include_mp4v2_file.h new file mode 100644 index 00000000000..fda28f2bbea --- /dev/null +++ b/multimedia/mp4v2/patches/patch-include_mp4v2_file.h @@ -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 --git a/multimedia/mp4v2/patches/patch-src_mp4.cpp b/multimedia/mp4v2/patches/patch-src_mp4.cpp new file mode 100644 index 00000000000..7f0f6497ce2 --- /dev/null +++ b/multimedia/mp4v2/patches/patch-src_mp4.cpp @@ -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 --git a/multimedia/mp4v2/patches/patch-src_mp4atom.cpp b/multimedia/mp4v2/patches/patch-src_mp4atom.cpp new file mode 100644 index 00000000000..4e987f2881f --- /dev/null +++ b/multimedia/mp4v2/patches/patch-src_mp4atom.cpp @@ -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(); + |