multimedia/mp4v2: switch to fork, update to 2.1.3

PR:		272326
This commit is contained in:
Matthias Andree 2023-07-02 10:54:37 +02:00
parent 67e845fc4f
commit c70787606c
13 changed files with 10 additions and 186 deletions

View file

@ -1,11 +1,11 @@
PORTNAME= mp4v2
PORTVERSION= 2.0.0
PORTVERSION= 2.1.3
CATEGORIES= multimedia
MASTER_SITES= GENTOO
MASTER_SITES= https://github.com/enzo1982/mp4v2/releases/download/v${PORTVERSION}/
MAINTAINER= multimedia@FreeBSD.org
COMMENT= Library and tools to read, create, and modify mp4 files
WWW= http://code.google.com/p/mp4v2/
WWW= http://mp4v2.org/
LICENSE= MPL11

View file

@ -1,3 +1,3 @@
TIMESTAMP = 1566907643
SHA256 (mp4v2-2.0.0.tar.bz2) = 0319b9a60b667cf10ee0ec7505eb7bdc0a2e21ca7a93db96ec5bd758e3428338
SIZE (mp4v2-2.0.0.tar.bz2) = 495672
TIMESTAMP = 1688287758
SHA256 (mp4v2-2.1.3.tar.bz2) = 033185c17bf3c5fdd94020c95f8325be2e5356558e3913c3d6547a85dd61f7f1
SIZE (mp4v2-2.1.3.tar.bz2) = 594549

View file

@ -1,11 +0,0 @@
--- src/itmf/type.cpp.orig 2012-05-20 22:11:53 UTC
+++ src/itmf/type.cpp
@@ -284,7 +284,7 @@ namespace {
{ BT_BMP, "\x42\x4d" },
{ BT_GIF, "GIF87a" },
{ BT_GIF, "GIF89a" },
- { BT_JPEG, "\xff\xd8\xff\xe0" },
+ { BT_JPEG, "\xff\xd8\xff" },
{ BT_PNG, "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a" },
{ BT_UNDEFINED } // must be last
};

View file

@ -1,15 +0,0 @@
--- src/mp4.cpp.orig 2012-05-20 22:11:53 UTC
+++ src/mp4.cpp
@@ -2402,8 +2402,11 @@ MP4FileHandle MP4ReadProvider( const cha
if (MP4_IS_VALID_FILE_HANDLE(hFile)) {
MP4File *pFile = (MP4File *)hFile;
try {
- return pFile->GetTrackIntegerProperty(trackId,
+ uint32_t bitrate = pFile->GetTrackIntegerProperty(trackId,
"mdia.minf.stbl.stsd.*.esds.decConfigDescr.avgBitrate");
+ if( bitrate != 0 ) {
+ return bitrate;
+ }
}
catch( Exception* x ) {
//mp4v2::impl::log.errorf(*x); we don't really need to print this.

View file

@ -1,20 +0,0 @@
--- src/mp4file_io.cpp.orig 2012-05-20 22:11:53 UTC
+++ src/mp4file_io.cpp
@@ -387,7 +387,7 @@ char* MP4File::ReadCountedString(uint8_t
charLength = ReadUInt8();
}
- if (fixedLength && (charLength > fixedLength)) {
+ if (fixedLength && (charLength > fixedLength - 1)) {
/*
* The counted length of this string is greater than the
* maxiumum fixed length, so truncate the string to the
@@ -397,7 +397,7 @@ char* MP4File::ReadCountedString(uint8_t
* a non counted string has been used in the place of a
* counted string).
*/
- WARNING(charLength > fixedLength);
+ WARNING(charLength > fixedLength - 1);
charLength = fixedLength - 1U;
}

View file

@ -1,29 +0,0 @@
--- src/mp4info.cpp.orig 2012-05-20 22:11:53 UTC
+++ src/mp4info.cpp
@@ -109,7 +109,7 @@ static char* PrintAudioInfo(
const char* typeName = "Unknown";
bool foundType = false;
uint8_t type = 0;
- const char *media_data_name;
+ const char *media_data_name = NULL;
media_data_name = MP4GetTrackMediaDataName(mp4File, trackId);
@@ -306,7 +306,7 @@ static char* PrintVideoInfo(
bool foundTypeName = false;
const char* typeName = "Unknown";
- const char *media_data_name;
+ const char *media_data_name = NULL;
char originalFormat[8];
char oformatbuffer[32];
originalFormat[0] = 0;
@@ -315,7 +315,7 @@ static char* PrintVideoInfo(
media_data_name = MP4GetTrackMediaDataName(mp4File, trackId);
// encv 264b
- if (strcasecmp(media_data_name, "encv") == 0) {
+ if (media_data_name != NULL && strcasecmp(media_data_name, "encv") == 0) {
if (MP4GetTrackMediaDataOriginalFormat(mp4File,
trackId,
originalFormat,

View file

@ -1,39 +0,0 @@
--- src/mp4util.cpp.orig 2012-05-20 22:11:53 UTC
+++ src/mp4util.cpp
@@ -195,6 +195,9 @@ static bool convertBase64 (const char da
return true;
}
+}} // namespace mp4v2::impl
+
+extern "C"
uint8_t *Base64ToBinary (const char *pData, uint32_t decodeSize, uint32_t *pDataSize)
{
uint8_t *ret;
@@ -208,7 +211,7 @@ uint8_t *Base64ToBinary (const char *pDa
}
size = (decodeSize * 3) / 4;
groups = decodeSize / 4;
- ret = (uint8_t *)MP4Calloc(size);
+ ret = (uint8_t *)mp4v2::impl::MP4Calloc(size);
if (ret == NULL) return NULL;
for (ix = 0; ix < groups; ix++) {
uint8_t value[4];
@@ -220,7 +223,7 @@ uint8_t *Base64ToBinary (const char *pDa
}
size--;
value[jx] = 0;
- } else if (convertBase64(pData[jx], &value[jx]) == false) {
+ } else if (mp4v2::impl::convertBase64(pData[jx], &value[jx]) == false) {
free(ret);
return NULL;
}
@@ -234,6 +237,8 @@ uint8_t *Base64ToBinary (const char *pDa
return ret;
}
+namespace mp4v2 { namespace impl {
+
// log2 of value, rounded up
static uint8_t ilog2(uint64_t value)
{

View file

@ -1,18 +0,0 @@
src/mp4.cpp:679:20: error: cannot initialize return object of type 'mp4v2_ismacrypParams *' (aka 'mp4v2_ismacryp_session_params *') with an rvalue of type 'MP4TrackId' (aka 'unsigned int')
return MP4_INVALID_TRACK_ID;
^~~~~~~~~~~~~~~~~~~~
./include/mp4v2/general.h:45:33: note: expanded from macro 'MP4_INVALID_TRACK_ID'
#define MP4_INVALID_TRACK_ID ((MP4TrackId)0) /**< Constant: invalid MP4TrackId. */
^~~~~~~~~~~~~~~
--- src/mp4.cpp.orig 2009-07-13 23:07:12 UTC
+++ src/mp4.cpp
@@ -676,7 +676,7 @@ MP4FileHandle MP4ReadProvider( const char* fileName, u
}
catch (...) {
- return MP4_INVALID_TRACK_ID;
+ return NULL;
}
}

View file

@ -1,11 +0,0 @@
--- src/mp4util.h.orig 2019-08-25 16:36:29 UTC
+++ src/mp4util.h
@@ -33,7 +33,7 @@ namespace mp4v2 { namespace impl {
#ifndef ASSERT
# define ASSERT(expr) \
if (!(expr)) { \
- throw new Exception("assert failure: "LIBMPV42_STRINGIFY((expr)), __FILE__, __LINE__, __FUNCTION__ ); \
+ throw new Exception("assert failure: " LIBMPV42_STRINGIFY((expr)), __FILE__, __LINE__, __FUNCTION__ ); \
}
#endif

View file

@ -1,15 +0,0 @@
src/rtphint.cpp:348:32: error: comparison between pointer and integer ('const char *' and 'int')
if (pSlash != '\0') {
~~~~~~ ^ ~~~~
--- src/rtphint.cpp.orig 2012-05-20 22:11:53 UTC
+++ src/rtphint.cpp
@@ -339,7 +339,7 @@ void MP4RtpHintTrack::GetPayload(
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);

View file

@ -1,10 +0,0 @@
--- util/mp4chaps.cpp.orig 2012-05-20 22:11:55 UTC
+++ util/mp4chaps.cpp
@@ -856,6 +856,7 @@ ChapterUtility::readChapterFile( const s
if( in.read( inBuf, fileSize, nin ) )
{
in.close();
+ free(inBuf);
return herrf( "reading chapter file '%s' failed: %s\n", filename.c_str(), sys::getLastErrorStr() );
}
in.close();

View file

@ -1,10 +0,0 @@
--- util/mp4tags.cpp.orig 2012-05-20 22:11:55 UTC
+++ util/mp4tags.cpp
@@ -539,6 +539,7 @@ extern "C" int
else {
fprintf( stderr, "Art file %s not found\n", tags[i] );
}
+ break;
}
case OPT_ALBUM_ARTIST:
MP4TagsSetAlbumArtist( mdata, tags[i] );

View file

@ -21,11 +21,13 @@ include/mp4v2/sample.h
include/mp4v2/streaming.h
include/mp4v2/track.h
include/mp4v2/track_prop.h
lib/libmp4v2.a
lib/libmp4v2.so
lib/libmp4v2.so.2
lib/libmp4v2.so.2.0.0
lib/libmp4v2.so.2.1.3
libdata/pkgconfig/mp4v2.pc
man/man1/mp4art.1.gz
man/man1/mp4chaps.1.gz
man/man1/mp4file.1.gz
man/man1/mp4subtitle.1.gz
man/man1/mp4tags.1.gz
man/man1/mp4track.1.gz