From nobody Mon Apr 25 08:43:41 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8F8CC1992871; Mon, 25 Apr 2022 08:43:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Kmz7d3YsYz3QM5; Mon, 25 Apr 2022 08:43:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650876221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2VQlYE4gDjrt+tTZ1Ynnv02F/3jHOc1ts8VpSHsjc0Q=; b=fWCBZQ2Vu+yH1XBl9b+iTXgp0w8dI/EK3H0kfLuowgvCYEJov7zJqzvh2ezWY0ruSLzz0q WyTruyvnzWMuQSmH4/KoPSrbQdbvkHE2OgRCtWfxGMGJqHJfvSQvwaxUUjWc2cbfnpavR4 eD68I+yGaT1DbiiJtEx1r7CaTJ3EGPoZivj7cKUt0WdaGyJouMdNAqlIrAf5OJAY+uQpzg o85WD9Lp6p4Tz8ZZQYVaTB1pxhOTht+KM1ooU9NNM4rigA8B2cUJXYSWRXWiTcrjY4ggDA 8OYXAMMBlbluHJWGdxyr6O5EIqepKwep/L/b+rT3KHwqzY5/qM/ID6y7YPwmHQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5A55A17AAE; Mon, 25 Apr 2022 08:43:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23P8hfvo073013; Mon, 25 Apr 2022 08:43:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23P8hf5n073011; Mon, 25 Apr 2022 08:43:41 GMT (envelope-from git) Date: Mon, 25 Apr 2022 08:43:41 GMT Message-Id: <202204250843.23P8hf5n073011@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dirk Meyer Subject: git: 6ff68a8504ee - main - multimedia/replex: Fix Abort on decoding mpeg with clang builds List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dinoex X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6ff68a8504ee1e1eb50d58990731be77df2960d3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650876221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2VQlYE4gDjrt+tTZ1Ynnv02F/3jHOc1ts8VpSHsjc0Q=; b=Z8kmqgnZQL7VdGF8ZVlme0729NEO9PkU37+8ppNBFC1N7iOr6tGAjzl8L6NyRcNuKz2FMy o86kB10eawW8Z4SzSM6wFSFsB6qyHItqZMg3o5/xtU3w3xYuVPkNUeazAmISlVvA7W6Xmg pW/SU94J2tZ+dfoOWChGFPBoQUFOaUaUtPlj1UDhovcO8XkyCNXLVjEg38dKpTKjyr+Z6H h2lTQ+Xosmo27CkqepKkjVQlXhrXYGnbCGSK+iAfLzMQxMA0ekdYzl6cXART/idZA5dgj0 RTjcY4saWBArPrTAWBeWvDcE6ZS/h4/f4MlManeVj9RWQGBEAmzFyeYPsUpplw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650876221; a=rsa-sha256; cv=none; b=qNrLCQEjKwGFL9wpHC5A/VrwpDH3Gkn4WstQ6PkfG6uzYQsQMNfqO+U4V61Mm246n/VVeJ dEo/hWS3OoFSyhVVLg1NYeFVtGowLmr8L8VbcPOzJXp3zEhAbsntrIs1CUyKAC+Zf5EyOD qKLf+pQJSJUSYvNzmCwg6Y4Wy5MdSpzMDyjwxML5wV/h6zkuaErJ7+/02b9+PdpDvOmppp QUwr3zQhDCmp+4vcsK3qHBNRYdti1PKnie8lwG8mTYOazlXi+zZAweTh8Pmyv/Z6R1Okxv QobgvBr3dpy6OMWSl1LQTbewKCOAqlbUMFCcDzya5NV0rExAmsHDY7Pv8wgs6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dinoex: URL: https://cgit.FreeBSD.org/ports/commit/?id=6ff68a8504ee1e1eb50d58990731be77df2960d3 commit 6ff68a8504ee1e1eb50d58990731be77df2960d3 Author: Dirk Meyer AuthorDate: 2022-04-25 08:43:29 +0000 Commit: Dirk Meyer CommitDate: 2022-04-25 08:43:29 +0000 multimedia/replex: Fix Abort on decoding mpeg with clang builds --- multimedia/replex/Makefile | 3 +-- multimedia/replex/files/patch-mpg_common.c | 15 ++++++++++++ multimedia/replex/files/patch-pes.c | 6 ++--- multimedia/replex/files/patch-replex.c | 38 ++++++++++++++++++++++++++++++ 4 files changed, 57 insertions(+), 5 deletions(-) diff --git a/multimedia/replex/Makefile b/multimedia/replex/Makefile index bb0ba2da6b6b..4659b8b770c9 100644 --- a/multimedia/replex/Makefile +++ b/multimedia/replex/Makefile @@ -1,5 +1,6 @@ PORTNAME= replex PORTVERSION= 0.1.6.8 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= multimedia MASTER_SITES= LOCAL/dinoex @@ -21,8 +22,6 @@ PORTDOCS= CHANGES README TODO .endif post-patch: - @${GREP} -lR "" ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e \ - 's|||g' @${REINPLACE_CMD} -e 's|-m32||' -e \ 's|-L. -lreplex|libreplex.a $${LIBS}|g' ${WRKSRC}/Makefile diff --git a/multimedia/replex/files/patch-mpg_common.c b/multimedia/replex/files/patch-mpg_common.c new file mode 100644 index 000000000000..9308c2ec3108 --- /dev/null +++ b/multimedia/replex/files/patch-mpg_common.c @@ -0,0 +1,15 @@ +--- mpg_common.c.orig 2007-06-19 09:30:08 UTC ++++ mpg_common.c +@@ -73,8 +73,10 @@ void show_buf(uint8_t *buf, int length) + else if (Data[i+2+offset]==0 && Data[i+3+offset]==1) \ + return i+1+offset; \ + } \ +- else if (x==1 && Data[i-1+offset]==0 && Data[i+offset]==0 && (i+offset)>0) \ +- return i-1+offset; \ ++ else if (x==1 && (i+offset)>0) { \ ++ if (Data[i-1+offset]==0 && Data[i+offset]==0) \ ++ return i-1+offset; \ ++ } \ + } + + int FindPacketHeader(const uint8_t *Data, int s, int l) diff --git a/multimedia/replex/files/patch-pes.c b/multimedia/replex/files/patch-pes.c index 4c95f268a38b..a5f51d86cd95 100644 --- a/multimedia/replex/files/patch-pes.c +++ b/multimedia/replex/files/patch-pes.c @@ -1,6 +1,6 @@ ---- pes.c.orig Sun Dec 28 17:57:19 2003 -+++ pes.c Tue Jan 20 05:15:09 2004 -@@ -26,6 +26,7 @@ +--- pes.c.orig 2007-06-19 09:30:08 UTC ++++ pes.c +@@ -28,6 +28,7 @@ #include #include diff --git a/multimedia/replex/files/patch-replex.c b/multimedia/replex/files/patch-replex.c new file mode 100644 index 000000000000..add60e554f9d --- /dev/null +++ b/multimedia/replex/files/patch-replex.c @@ -0,0 +1,38 @@ +--- replex.c.orig 2007-06-19 09:30:08 UTC ++++ replex.c +@@ -442,7 +442,7 @@ static int analyze_audio_loop( pes_in_t *p, struct rep + } + + if( iu->err!= JUMP_ERR && !rx->keep_pts && diff > 40*CLOCK_MS){ +- if (!rx->allow_jump || abs((int)diff) > rx->allow_jump){ ++ if (!rx->allow_jump || labs((int)diff) > rx->allow_jump){ + fprintf(stderr,"audio PTS inconsistent: "); + printpts(dpts); + printpts(iu->pts); +@@ -698,7 +698,7 @@ void analyze_video( pes_in_t *p, struct replex *rx, in + + newpts); + + if (rx->allow_jump && +- abs(diff) > rx->allow_jump) ++ labs(diff) > rx->allow_jump) + { + if (audio_jump(rx)){ + fprintf(stderr,"AUDIO JUMPED\n"); +@@ -716,7 +716,7 @@ void analyze_video( pes_in_t *p, struct replex *rx, in + } + + if (!rx->keep_pts && +- abs((int)(diff)) > 3*SEC_PER/2){ ++ labs((int)(diff)) > 3*SEC_PER/2){ + fprintf(stderr,"video PTS inconsistent: "); + printpts(trans_pts_dts(p->pts)); + printpts(iu->pts); +@@ -735,7 +735,7 @@ void analyze_video( pes_in_t *p, struct replex *rx, in + newdts + + rx->first_vpts); + if (!rx->keep_pts && !keep_now && +- abs((int)diff) > 3*SEC_PER/2){ ++ labs((int)diff) > 3*SEC_PER/2){ + fprintf(stderr,"video DTS inconsistent: "); + printpts(trans_pts_dts(p->dts)); + printpts(iu->dts);