rtmpdump: update to 2.4.20161210

This commit is contained in:
Jürgen Buchmüller 2017-03-07 02:48:23 +01:00
parent 352dd1c4b8
commit 0c7d6ac7ab
2 changed files with 52 additions and 4 deletions

View file

@ -0,0 +1,44 @@
--- librtmp/rtmp.c
+++ 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);
+ }
}
}

View file

@ -1,14 +1,18 @@
# Template file for 'rtmpdump'
pkgname=rtmpdump
version=2.4
revision=14
version=2.4.20161210
revision=1
_patchlevel=${version##*.}
create_wrksrc=yes
makedepends="zlib-devel libressl-devel"
short_desc="Toolkit for RTMP streams"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
homepage="http://rtmpdump.mplayerhq.hu/"
license="GPL-2, LGPL-2.1"
distfiles="http://dev.gentoo.org/~hwoarang/distfiles/${pkgname}-${version}.tar.gz"
checksum=51f54d37907f19bfa00219d57ec6e12d09458bb31360e8cf004883df745f094c
distfiles="http://dev.gentoo.org/~hwoarang/distfiles/${pkgname}-${version%.*}_p${_patchlevel}.tar.gz"
checksum=d6da3b683f1045f02d94a81b0c583318dba021f69bdab970c5d5d73e8c38860f
CFLAGS="-Wno-unused-const-variable -Wno-unused-but-set-variable"
do_build() {
make CC="$CC" OPT="$CFLAGS" LDFLAGS="$LDFLAGS" ${makejobs}