commit:     8925a1e09b6a8990ff55115e43d4fa88424801c5
Author:     Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Mon May  9 13:26:31 2022 +0000
Commit:     Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Mon May  9 13:30:59 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8925a1e0

media-video/rtmpdump: Bump, EAPI=8, fix-chunk-size.patch

See: 
https://git.alpinelinux.org/aports/commit/main/rtmpdump/fix-chunk-size.patch?id=bf39fb1177ee77eee6c214a7393cc0054958ce08
See: 
https://git.alpinelinux.org/aports/commit/main/rtmpdump/fix-chunk-size.patch?id=69bc162319b12e9b6c6d3ea345dbf7c218753594
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>

 media-video/rtmpdump/Manifest                      |  1 +
 .../rtmpdump/files/rtmpdump-fix-chunk-size.patch   | 46 ++++++++++++++++++++++
 ...p-9999.ebuild => rtmpdump-2.4_p20210219.ebuild} |  9 +++--
 media-video/rtmpdump/rtmpdump-9999.ebuild          |  9 +++--
 4 files changed, 57 insertions(+), 8 deletions(-)

diff --git a/media-video/rtmpdump/Manifest b/media-video/rtmpdump/Manifest
index 544f56a93968..bd3f5fadcdf9 100644
--- a/media-video/rtmpdump/Manifest
+++ b/media-video/rtmpdump/Manifest
@@ -1,2 +1,3 @@
 DIST rtmpdump-2.4_p20161210.tar.gz 142837 BLAKE2B 
412a7c3b21738db643042e51e03b11e115ae1d68214e644374e8c10f3b2ab3f659ce1af884135d0e89f2e0ba44ebdf41937bc0f02d875c463ca711d9ae95698c
 SHA512 
76617f02c13d7e8e3a7cf2734c6174e56fb321a881c9e4869bf6393786b193e0c01a8c530ecbf0679cc888c523af5712f2dcb2031fbd09729b7ddeebc3a4b133
 DIST rtmpdump-2.4_p20190330.tar.gz 143037 BLAKE2B 
ab0edbca444fc71034a1c6386f304d8f49f92075f6d4ca87992a7b9c4b4058f84333011e86cf38470f7b1dbf5e69f27e8b1fe34267104191c447342a03c18e3c
 SHA512 
5357d01b51d3ec8c3c584c4e5aa9720a4c04b86573bc6cb7d724d660937b04b6dd35338b17721d6521fde2627e83763ed3b7c010f959bd72573016f3c47480b0
+DIST rtmpdump-2.4_p20210219.tar.gz 143043 BLAKE2B 
312a44fa6caba3fbae19c248d76dccd22c637884ce37c207afe9de80eb0655a97af51101cd2800a2aea52620578f63e1ccede5070772126297e1c75baff0217b
 SHA512 
2bcd169c8c142390e4a37a5f115bb722f8878188920818349aead50ad6c40b8e96c4f929f1b4d6c26ebc05ee264e6675d3843bf963ad4fbac04c3ce74b7fbb20

diff --git a/media-video/rtmpdump/files/rtmpdump-fix-chunk-size.patch 
b/media-video/rtmpdump/files/rtmpdump-fix-chunk-size.patch
new file mode 100644
index 000000000000..b714273273aa
--- /dev/null
+++ b/media-video/rtmpdump/files/rtmpdump-fix-chunk-size.patch
@@ -0,0 +1,46 @@
+diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c
+index a2863b0..ac1b3be 100644
+--- a/librtmp/rtmp.c
++++ b/librtmp/rtmp.c
+@@ -2077,6 +2077,29 @@ RTMP_SendClientBW(RTMP *r)
+ }
+ 
+ static int
++SendClientChunkSize(RTMP *r, int chunkSize)
++{
++  RTMPPacket packet;
++  char pbuf[256], *pend = pbuf + sizeof(pbuf);
++  int ret;
++
++  packet.m_nChannel = 0x02;   /* control channel (invoke) */
++  packet.m_headerType = RTMP_PACKET_SIZE_LARGE;
++  packet.m_packetType = RTMP_PACKET_TYPE_CHUNK_SIZE;
++  packet.m_nTimeStamp = 0;
++  packet.m_nInfoField2 = 0;
++  packet.m_hasAbsTimestamp = 0;
++  packet.m_body = pbuf + RTMP_MAX_HEADER_SIZE;
++
++  packet.m_nBodySize = 4;
++
++  AMF_EncodeInt32(packet.m_body, pend, chunkSize);
++  ret = RTMP_SendPacket(r, &packet, FALSE);
++  r->m_outChunkSize = chunkSize;
++  return ret;
++}
++
++static int
+ SendBytesReceived(RTMP *r)
+ {
+   RTMPPacket packet;
+@@ -3349,6 +3372,11 @@ HandleChangeChunkSize(RTMP *r, const RTMPPacket *packet)
+       r->m_inChunkSize = AMF_DecodeInt32(packet->m_body);
+       RTMP_Log(RTMP_LOGDEBUG, "%s, received: chunk size change to %d", 
__FUNCTION__,
+         r->m_inChunkSize);
++      if (r->Link.protocol & RTMP_FEATURE_WRITE)
++        {
++          RTMP_Log(RTMP_LOGDEBUG, "%s, updating outChunkSize too", 
__FUNCTION__);
++          SendClientChunkSize(r, r->m_inChunkSize);
++        }
+     }
+ }
+ 

diff --git a/media-video/rtmpdump/rtmpdump-9999.ebuild 
b/media-video/rtmpdump/rtmpdump-2.4_p20210219.ebuild
similarity index 90%
copy from media-video/rtmpdump/rtmpdump-9999.ebuild
copy to media-video/rtmpdump/rtmpdump-2.4_p20210219.ebuild
index 77b536382925..edd05e9dc2dd 100644
--- a/media-video/rtmpdump/rtmpdump-9999.ebuild
+++ b/media-video/rtmpdump/rtmpdump-2.4_p20210219.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="7"
+EAPI="8"
 
 inherit multilib toolchain-funcs multilib-minimal flag-o-matic
 
@@ -26,6 +26,7 @@ RDEPEND="${DEPEND}"
 PATCHES=(
        "${FILESDIR}/${PN}-swf_vertification_type_2.patch"
        "${FILESDIR}/${PN}-swf_vertification_type_2_part_2.patch"
+       "${FILESDIR}/${PN}-fix-chunk-size.patch"
 )
 
 if [[ ${PV} == *9999 ]] ; then
@@ -34,8 +35,8 @@ if [[ ${PV} == *9999 ]] ; then
        inherit git-r3
 else
        KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~x86 
~amd64-linux ~x86-linux"
-       
SRC_URI="http://git.ffmpeg.org/gitweb/rtmpdump.git/snapshot/c5f04a58fc2aeea6296ca7c44ee4734c18401aa3.tar.gz
 -> ${P}.tar.gz"
-       S="${WORKDIR}/${PN}-c5f04a5"
+       
SRC_URI="https://git.ffmpeg.org/gitweb/rtmpdump.git/snapshot/f1b83c10d8beb43fcc70a6e88cf4325499f25857.tar.gz
 -> ${P}.tar.gz"
+       S="${WORKDIR}/${PN}-f1b83c1"
 fi
 
 pkg_setup() {

diff --git a/media-video/rtmpdump/rtmpdump-9999.ebuild 
b/media-video/rtmpdump/rtmpdump-9999.ebuild
index 77b536382925..edd05e9dc2dd 100644
--- a/media-video/rtmpdump/rtmpdump-9999.ebuild
+++ b/media-video/rtmpdump/rtmpdump-9999.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="7"
+EAPI="8"
 
 inherit multilib toolchain-funcs multilib-minimal flag-o-matic
 
@@ -26,6 +26,7 @@ RDEPEND="${DEPEND}"
 PATCHES=(
        "${FILESDIR}/${PN}-swf_vertification_type_2.patch"
        "${FILESDIR}/${PN}-swf_vertification_type_2_part_2.patch"
+       "${FILESDIR}/${PN}-fix-chunk-size.patch"
 )
 
 if [[ ${PV} == *9999 ]] ; then
@@ -34,8 +35,8 @@ if [[ ${PV} == *9999 ]] ; then
        inherit git-r3
 else
        KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~x86 
~amd64-linux ~x86-linux"
-       
SRC_URI="http://git.ffmpeg.org/gitweb/rtmpdump.git/snapshot/c5f04a58fc2aeea6296ca7c44ee4734c18401aa3.tar.gz
 -> ${P}.tar.gz"
-       S="${WORKDIR}/${PN}-c5f04a5"
+       
SRC_URI="https://git.ffmpeg.org/gitweb/rtmpdump.git/snapshot/f1b83c10d8beb43fcc70a6e88cf4325499f25857.tar.gz
 -> ${P}.tar.gz"
+       S="${WORKDIR}/${PN}-f1b83c1"
 fi
 
 pkg_setup() {

Reply via email to