summaryrefslogtreecommitdiff
path: root/media-libs
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/Manifest.gzbin68441 -> 68445 bytes
-rw-r--r--media-libs/libmp4v2/Manifest5
-rw-r--r--media-libs/libmp4v2/files/libmp4v2-2.0.0-unsigned-int-cast.patch21
-rw-r--r--media-libs/libmp4v2/files/libmp4v2-2.1.3-mem-leaks-1.patch150
-rw-r--r--media-libs/libmp4v2/files/libmp4v2-2.1.3-mem-leaks-2.patch30
-rw-r--r--media-libs/libmp4v2/libmp4v2-2.1.3-r1.ebuild34
-rw-r--r--media-libs/libsidplayfp/Manifest2
-rw-r--r--media-libs/libsidplayfp/libsidplayfp-2.5.0.ebuild29
8 files changed, 249 insertions, 22 deletions
diff --git a/media-libs/Manifest.gz b/media-libs/Manifest.gz
index 70e69e29f321..45631d638722 100644
--- a/media-libs/Manifest.gz
+++ b/media-libs/Manifest.gz
Binary files differ
diff --git a/media-libs/libmp4v2/Manifest b/media-libs/libmp4v2/Manifest
index 6104861862e5..f2712bf77c1f 100644
--- a/media-libs/libmp4v2/Manifest
+++ b/media-libs/libmp4v2/Manifest
@@ -1,4 +1,7 @@
-AUX libmp4v2-2.0.0-unsigned-int-cast.patch 2922 BLAKE2B 660ee262d6a21540b9646aa87f911373042c1f1f879b18a913d07fd267fa2275556f8a0e18e86c28ce4a737f136d53c2dbd21602635b12b490535f3e8d8e0ef7 SHA512 89cb78624096e4182056c4e9099cc13cb6251330d741ccaabe557eeb21c2df77d71367da21c16d2c33b1a7dde49429f57c7673d49be0e9a459af491a00305f37
+AUX libmp4v2-2.0.0-unsigned-int-cast.patch 2203 BLAKE2B 56a4c5385de3c541cc435da18a6aa0ec4f55b663c66458e04e2b6945933259500b279b92c2cfcaa3c7eb6fb0b1cbd40ea2eb8637e13ff2b2bd1cfe0204481de0 SHA512 f58746289e85d91f071a196465114d732b81326029a34ea4270c5aae21dcf430b4ff3646bc460e5793e6e2a0f2bdaee8651d99758545aec1d990716005a67303
+AUX libmp4v2-2.1.3-mem-leaks-1.patch 4446 BLAKE2B 294979911d1d91e499668632f2e0e87817592b4f7b3a9363c7bcf6a6ee07db13e14f96358b73b81024f74eaecf01cdb5530b244a136c6374a9a5c369131b65c0 SHA512 69070babe0ab4f7d2c95278a2ed6b271767b9bbb51702b60858e393e7e0646c4da256e076e624ccb4e6844f58efc80e4cddd9fcdfcaf7fa343e391ed2873001f
+AUX libmp4v2-2.1.3-mem-leaks-2.patch 855 BLAKE2B dc4d22fde5842109600e783f44824dc3b9ae62dcd56334f1a944f30166e3d8b1783cd09e208fe7a7a81a869b9cca79640bfbbb18dc888b93655b513655199f6c SHA512 c7691a55a2c24948bd96194cd66e1255b5043b100b5afee7944eb7c5ffbe78c2b3907f0342cd7640c7b44b3e5b59ad7d2cdb2b900cd13d3b64008cf2a9c67847
DIST mp4v2-2.1.3.tar.bz2 594549 BLAKE2B ee8e5792b5b92098e2990bd76a8be7aa6cffc60cb28059702a07eb5cc73dcc9def59dec290f40cbf246069b491d1911714fb00f8d48b77e421e8993fac37f76c SHA512 89bca9c76cf468a932a09d66bc5409266acde51184bf1262c5bc9a524ee5c9a3e073fd0d37450580284e12d9d46d1fd5db0c4ce647c365cc5106fb39ee3d59f6
+EBUILD libmp4v2-2.1.3-r1.ebuild 850 BLAKE2B abc3cf2d2f4457acf4824d45d47950f24d3040692028a9bf0673ce249bd1bee5c0d07ef3f45714880091234fa744151e476999303cd3059500115006553d7a91 SHA512 4e7b335e318baab8902b64350fb6698d81d3eae92894a83504749bc8c2ecce6a6ff5f3a01480b2e2b397cd0e1f6a0a8c70b1bf5fe76cf29db8f93fa9f1484161
EBUILD libmp4v2-2.1.3.ebuild 768 BLAKE2B 0bac671d1a362fa4d9ddac6a7b6110abd81e6176fe76cadf8c3beb9e691c75774d421ca544f593d0ed0c961167e564096eae004569b613e38a9b8f0e0d5575a8 SHA512 2b2d5cb5408990dc84522e0b839261dd40d504d2c83e4e7cb5e303f8632b2e11ac95414f0f47747967f2f857f8d3daf6d9ffe037f950ce861020bbdd0b039c4f
MISC metadata.xml 407 BLAKE2B bce0be3a2817259413395a925b55e59d503f988bc2d54b9fd3ff632de284205bb515944e3b1ec95da6a7df2f45f32b1a78706e902f5ea4ff6cebe085db483782 SHA512 999f244426cf480a967cb030e4e3e5c63e39c4fc7eb73e3c0e091b492b65f6aef2b66856ee9040a5d9d44efe72a136fea848479875a39eac37bc62dfaa294777
diff --git a/media-libs/libmp4v2/files/libmp4v2-2.0.0-unsigned-int-cast.patch b/media-libs/libmp4v2/files/libmp4v2-2.0.0-unsigned-int-cast.patch
index 25830bc596be..a5b28c32022f 100644
--- a/media-libs/libmp4v2/files/libmp4v2-2.0.0-unsigned-int-cast.patch
+++ b/media-libs/libmp4v2/files/libmp4v2-2.0.0-unsigned-int-cast.patch
@@ -4,17 +4,6 @@ Date: Thu, 6 Aug 2020 15:22:04 +0200
Subject: [PATCH] Static cast to unsigned int for cases
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
----
- libutil/Utility.cpp | 2 +-
- util/mp4art.cpp | 2 +-
- util/mp4chaps.cpp | 2 +-
- util/mp4file.cpp | 2 +-
- util/mp4subtitle.cpp | 2 +-
- util/mp4track.cpp | 2 +-
- 6 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/libutil/Utility.cpp b/libutil/Utility.cpp
-index 76cdd12..d6739d4 100644
--- a/libutil/Utility.cpp
+++ b/libutil/Utility.cpp
@@ -493,7 +493,7 @@ Utility::process_impl()
@@ -26,8 +15,6 @@ index 76cdd12..d6739d4 100644
case 'z':
_optimize = true;
break;
-diff --git a/util/mp4art.cpp b/util/mp4art.cpp
-index add935e..6e7f531 100644
--- a/util/mp4art.cpp
+++ b/util/mp4art.cpp
@@ -376,7 +376,7 @@ ArtUtility::utility_option( int code, bool& handled )
@@ -39,8 +26,6 @@ index add935e..6e7f531 100644
case LC_ART_ANY:
_artFilter = numeric_limits<uint32_t>::max();
break;
-diff --git a/util/mp4chaps.cpp b/util/mp4chaps.cpp
-index 98400f8..ccc8b70 100644
--- a/util/mp4chaps.cpp
+++ b/util/mp4chaps.cpp
@@ -632,7 +632,7 @@ ChapterUtility::utility_option( int code, bool& handled )
@@ -52,8 +37,6 @@ index 98400f8..ccc8b70 100644
case 'A':
case LC_CHPT_ANY:
_ChapterType = MP4ChapterTypeAny;
-diff --git a/util/mp4file.cpp b/util/mp4file.cpp
-index c27844b..b127cd1 100644
--- a/util/mp4file.cpp
+++ b/util/mp4file.cpp
@@ -189,7 +189,7 @@ FileUtility::utility_option( int code, bool& handled )
@@ -65,8 +48,6 @@ index c27844b..b127cd1 100644
case LC_LIST:
_action = &FileUtility::actionList;
break;
-diff --git a/util/mp4subtitle.cpp b/util/mp4subtitle.cpp
-index 7462153..19d977d 100644
--- a/util/mp4subtitle.cpp
+++ b/util/mp4subtitle.cpp
@@ -164,7 +164,7 @@ SubtitleUtility::utility_option( int code, bool& handled )
@@ -78,8 +59,6 @@ index 7462153..19d977d 100644
case LC_LIST:
_action = &SubtitleUtility::actionList;
break;
-diff --git a/util/mp4track.cpp b/util/mp4track.cpp
-index d550506..cd63d7e 100644
--- a/util/mp4track.cpp
+++ b/util/mp4track.cpp
@@ -788,7 +788,7 @@ TrackUtility::utility_option( int code, bool& handled )
diff --git a/media-libs/libmp4v2/files/libmp4v2-2.1.3-mem-leaks-1.patch b/media-libs/libmp4v2/files/libmp4v2-2.1.3-mem-leaks-1.patch
new file mode 100644
index 000000000000..a12c24f4e3fe
--- /dev/null
+++ b/media-libs/libmp4v2/files/libmp4v2-2.1.3-mem-leaks-1.patch
@@ -0,0 +1,150 @@
+From c724815a541b763455ff38922af96f652627bce6 Mon Sep 17 00:00:00 2001
+From: Robert Kausch <robert.kausch@freac.org>
+Date: Tue, 16 May 2023 00:19:02 +0200
+Subject: [PATCH] Fix memory leaks in case MP4File::ReadBytes() throws an
+ exception.
+
+--- a/src/atom_rtp.cpp
++++ b/src/atom_rtp.cpp
+@@ -125,12 +125,19 @@ void MP4RtpAtom::ReadHntiType()
+
+ // read sdp string, length is implicit in size of atom
+ uint64_t size = GetEnd() - m_File.GetPosition();
+- char* data = (char*)MP4Malloc(size + 1);
++ char* data = (char*) MP4Malloc(size + 1);
+ ASSERT(data != NULL);
+- m_File.ReadBytes((uint8_t*)data, size);
+- data[size] = '\0';
+- ((MP4StringProperty*)m_pProperties[1])->SetValue(data);
+- MP4Free(data);
++ try {
++ m_File.ReadBytes((uint8_t*) data, size);
++ data[size] = '\0';
++ ((MP4StringProperty*) m_pProperties[1])->SetValue(data);
++ MP4Free(data);
++ }
++ catch (Exception*) {
++ // free memory and rethrow
++ MP4Free(data);
++ throw;
++ }
+ }
+
+ void MP4RtpAtom::Write()
+--- a/src/atom_sdp.cpp
++++ b/src/atom_sdp.cpp
+@@ -36,12 +36,19 @@ void MP4SdpAtom::Read()
+ {
+ // read sdp string, length is implicit in size of atom
+ uint64_t size = GetEnd() - m_File.GetPosition();
+- char* data = (char*)MP4Malloc(size + 1);
++ char* data = (char*) MP4Malloc(size + 1);
+ ASSERT(data != NULL);
+- m_File.ReadBytes((uint8_t*)data, size);
+- data[size] = '\0';
+- ((MP4StringProperty*)m_pProperties[0])->SetValue(data);
+- MP4Free(data);
++ try {
++ m_File.ReadBytes((uint8_t*) data, size);
++ data[size] = '\0';
++ ((MP4StringProperty*) m_pProperties[0])->SetValue(data);
++ MP4Free(data);
++ }
++ catch (Exception*) {
++ // free memory and rethrow
++ MP4Free(data);
++ throw;
++ }
+ }
+
+ void MP4SdpAtom::Write()
+--- a/src/mp4file_io.cpp
++++ b/src/mp4file_io.cpp
+@@ -325,19 +325,26 @@ char* MP4File::ReadString()
+ {
+ uint32_t length = 0;
+ uint32_t alloced = 64;
+- char* data = (char*)MP4Malloc(alloced);
+-
+- do {
+- if (length == alloced) {
+- data = (char*)MP4Realloc(data, alloced * 2);
+- if (data == NULL) return NULL;
+- alloced *= 2;
+- }
+- ReadBytes((uint8_t*)&data[length], 1);
+- length++;
+- } while (data[length - 1] != 0);
+-
+- data = (char*)MP4Realloc(data, length);
++ char* data = (char*) MP4Malloc(alloced);
++ try {
++ do {
++ if (length == alloced) {
++ data = (char*) MP4Realloc(data, alloced * 2);
++ if (data == NULL)
++ return NULL;
++ alloced *= 2;
++ }
++ ReadBytes((uint8_t*) &data[length], 1);
++ length++;
++ } while (data[length - 1] != 0);
++
++ data = (char*) MP4Realloc(data, length);
++ }
++ catch (Exception*) {
++ // free memory and rethrow
++ MP4Free(data);
++ throw;
++ }
+ return data;
+ }
+
+@@ -384,21 +391,34 @@ char* MP4File::ReadCountedString(uint8_t charSize, bool allowExpandedCount, uint
+ }
+
+ uint32_t byteLength = charLength * charSize;
+- char* data = (char*)MP4Malloc(byteLength + 1);
+- if (byteLength > 0) {
+- ReadBytes((uint8_t*)data, byteLength);
+- }
+- data[byteLength] = '\0';
+-
+- // read padding
+- if (fixedLength) {
+- const uint8_t padsize = fixedLength - byteLength -1U;
+- if( padsize ) {
+- uint8_t* padbuf = (uint8_t*)malloc( padsize );
+- ReadBytes( padbuf, padsize );
+- free( padbuf );
++ char* data = (char*) MP4Malloc(byteLength + 1);
++ try {
++ if (byteLength > 0)
++ ReadBytes((uint8_t*) data, byteLength);
++ data[byteLength] = '\0';
++
++ // read padding
++ if (fixedLength) {
++ const uint8_t padsize = fixedLength - byteLength -1U;
++ if (padsize) {
++ uint8_t* padbuf = (uint8_t*) MP4Malloc(padsize);
++ try {
++ ReadBytes(padbuf, padsize);
++ MP4Free(padbuf);
++ }
++ catch (Exception*) {
++ // free memory and rethrow
++ MP4Free(padbuf);
++ throw;
++ }
++ }
+ }
+ }
++ catch (Exception*) {
++ // free memory and rethrow
++ MP4Free(data);
++ throw;
++ }
+
+ return data;
+ }
diff --git a/media-libs/libmp4v2/files/libmp4v2-2.1.3-mem-leaks-2.patch b/media-libs/libmp4v2/files/libmp4v2-2.1.3-mem-leaks-2.patch
new file mode 100644
index 000000000000..800812a034d3
--- /dev/null
+++ b/media-libs/libmp4v2/files/libmp4v2-2.1.3-mem-leaks-2.patch
@@ -0,0 +1,30 @@
+From 0f97a87685c8fcf9d7b9b21167265b21b1c34cc5 Mon Sep 17 00:00:00 2001
+From: Robert Kausch <robert.kausch@freac.org>
+Date: Tue, 16 May 2023 00:11:53 +0200
+Subject: [PATCH] Fix memory leaks in MP4StringProperty and MP4BytesProperty
+ classes.
+
+--- a/src/mp4property.cpp
++++ b/src/mp4property.cpp
+@@ -343,6 +343,10 @@ void MP4StringProperty::SetCount(uint32_t count)
+ {
+ uint32_t oldCount = m_values.Size();
+
++ for (uint32_t i = count; i < oldCount; i++) {
++ MP4Free(m_values[i]);
++ }
++
+ m_values.Resize(count);
+
+ for (uint32_t i = oldCount; i < count; i++) {
+@@ -510,6 +514,10 @@ void MP4BytesProperty::SetCount(uint32_t count)
+ {
+ uint32_t oldCount = m_values.Size();
+
++ for (uint32_t i = count; i < oldCount; i++) {
++ MP4Free(m_values[i]);
++ }
++
+ m_values.Resize(count);
+ m_valueSizes.Resize(count);
+
diff --git a/media-libs/libmp4v2/libmp4v2-2.1.3-r1.ebuild b/media-libs/libmp4v2/libmp4v2-2.1.3-r1.ebuild
new file mode 100644
index 000000000000..99115cb4f656
--- /dev/null
+++ b/media-libs/libmp4v2/libmp4v2-2.1.3-r1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MY_P=${P/lib}
+
+inherit cmake
+
+DESCRIPTION="Functions for accessing ISO-IEC:14496-1:2001 MPEG-4 standard"
+HOMEPAGE="https://mp4v2.org/"
+SRC_URI="https://github.com/enzo1982/mp4v2/releases/download/v${PV}/${MY_P}.tar.bz2"
+
+LICENSE="MPL-1.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+IUSE="utils"
+# Tests need DejaGnu but are non-existent (just an empty framework)
+RESTRICT="test"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.0.0-unsigned-int-cast.patch"
+ "${FILESDIR}/${P}-mem-leaks-1.patch"
+ "${FILESDIR}/${P}-mem-leaks-2.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_UTILS=$(usex utils)
+ )
+ cmake_src_configure
+}
diff --git a/media-libs/libsidplayfp/Manifest b/media-libs/libsidplayfp/Manifest
index 04070b8981be..10b63223b6d0 100644
--- a/media-libs/libsidplayfp/Manifest
+++ b/media-libs/libsidplayfp/Manifest
@@ -1,3 +1,5 @@
DIST libsidplayfp-2.4.2.tar.gz 800857 BLAKE2B 1c9471e9e308c1ea5cf544f8dc2c37c637f79aac38d703e0d22dcfd8b18db2b75b98d66ef2aff190b0634ab468fbce1a46de9c65d3b7f02dd40bdc879b20290e SHA512 38b13a7a9740d43e8f6c8a6d410a4f136a44c893d6d671f0f6e66cab7f2e508ab0e108c90213c7fa91389683e0ba4008f36964f7ef455cca56c9ca5366092878
+DIST libsidplayfp-2.5.0.tar.gz 806655 BLAKE2B 479c461d0768932b9f8db0dab37331ca1b0266f4a3f60d676411318283df11a0782ebd20374c2fa535cce6c61b5d5b7e2b0533e04b006b324387e1bcc24d86ce SHA512 2390c7629bf721bc0d7bfa6b1750ba873a2007fa500ea611f4dcdeff34ab1d83124afdd9c88fc2de557bb7d271c0c2f962e5818e53ea5b3649431799296d6438
EBUILD libsidplayfp-2.4.2.ebuild 672 BLAKE2B cfc37b16bfddd7e622111a952f29ca72a9c56a5c6869aba70fe3ab1c1204c051f0cfd70f0375043d83bf79fda48ab9d651872a9d7ef93816b4df9b7b7fd0dab9 SHA512 d322cdcb576f4f36f7211a48cef23775ae9ad4b69630fbd8825d15315db117908958ebc4329d417b905ec9f0a98aef386885a05ee385975967011691f9c8a5c6
+EBUILD libsidplayfp-2.5.0.ebuild 674 BLAKE2B de70d5447b8a500094c43ef3b5dfe494dfd0069b348c69b8064a49af976d01ed821d4546ee198f89674e477bad29feae0eac0fb8853a34a7ba3d64517b3c63c6 SHA512 4bbf4a80c17424e29cfdcf0e15e83a341cfcf7616753ca1551b997d5db4c9e290998d6843605d3f474d22d6c72cd2390c8e87cfdab3f9644e341f6b6b7f9ab36
MISC metadata.xml 339 BLAKE2B 79d766f101909c202affb7cc72bbefdfb8d5b44fcbf74f17f98e665351384a8110aec7ddec0c685fb328198d29ae4953ce341cda3dd4abd2a67f157d90628175 SHA512 172879da9ed0be1ff48d75d23d3b23e3070247b4ef1decb291b020f7bc1522dd033e78f92d38511eedaae7c1944edc5bb05ff763f4d20a6b7015198ebd38f16f
diff --git a/media-libs/libsidplayfp/libsidplayfp-2.5.0.ebuild b/media-libs/libsidplayfp/libsidplayfp-2.5.0.ebuild
new file mode 100644
index 000000000000..afdbdc7f3a8a
--- /dev/null
+++ b/media-libs/libsidplayfp/libsidplayfp-2.5.0.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Library for the sidplay2 fork with resid-fp"
+HOMEPAGE="https://sourceforge.net/projects/sidplay-residfp/"
+SRC_URI="mirror://sourceforge/sidplay-residfp/${PN}/$(ver_cut 1-2)/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0/6"
+KEYWORDS="~amd64 ~hppa ~riscv ~x86"
+IUSE="static-libs"
+
+src_prepare() {
+ default
+ # fix automagic. warning: modifying .ac triggers maintainer mode.
+ sed -i -e 's:doxygen:dIsAbLe&:' configure || die
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -delete || die
+}