diff options
author | Timo Teräs <timo.teras@iki.fi> | 2016-09-09 19:24:47 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2016-09-09 19:27:10 +0300 |
commit | 69bc162319b12e9b6c6d3ea345dbf7c218753594 (patch) | |
tree | 345ba3736bac261419f27340be2b908c1d83b7cd /main/rtmpdump | |
parent | 2723c6224b096ceb7b9c36fd47660b565e7cce1c (diff) | |
download | aports-69bc162319b12e9b6c6d3ea345dbf7c218753594.tar.bz2 aports-69bc162319b12e9b6c6d3ea345dbf7c218753594.tar.xz |
main/rtmpdump: update upstream snapshot, fix chunk size patch
fixes #6127
Diffstat (limited to 'main/rtmpdump')
-rw-r--r-- | main/rtmpdump/APKBUILD | 16 | ||||
-rw-r--r-- | main/rtmpdump/fix-chunk-size.patch | 53 |
2 files changed, 41 insertions, 28 deletions
diff --git a/main/rtmpdump/APKBUILD b/main/rtmpdump/APKBUILD index 5a234be32a..530564a39c 100644 --- a/main/rtmpdump/APKBUILD +++ b/main/rtmpdump/APKBUILD @@ -2,8 +2,8 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=rtmpdump verbase=2.4 -pkgver=2.4_git20141231 -pkgrel=2 +pkgver=2.4_git20160909 +pkgrel=0 pkgdesc="A tool to download rtmp:// and rtmpe:// streams" url="http://rtmpdump.mplayerhq.hu/" arch="all" @@ -38,9 +38,9 @@ librtmp() { mv "$pkgdir"/usr/lib "$subpkgdir"/usr/ } -md5sums="03c4c1fdfff2fc16f89c88097c2a132a rtmpdump-2.4_git20141231.tar.gz -d7111fb8afe34ca52a5697bd91b641d9 fix-chunk-size.patch" -sha256sums="f2c7309a9c58c9da9c310c830c9fcb09f6ed999b074c585b4c127ad9ecba1b39 rtmpdump-2.4_git20141231.tar.gz -dbb2dc7f99bfb38c8440d60e11c03986470fef6d73d64767f9414d95812ab38c fix-chunk-size.patch" -sha512sums="3029e7e6079b8ae444c60dee3dcabf637570a51d26d5ca546603fa1cf4e3f2c9f2a8e721a14e5710b13bd746ba73004f2ce3d46b3388b52cf5775b522d8b1eb6 rtmpdump-2.4_git20141231.tar.gz -ddc7d2a67648284eaace4304864c8aabd14b4e2b90124915058b83c6a27a1feeb77fb2c76f77168975631982dc0c6c0eeafdd6a767cd3b1e8b5d771ade072a3c fix-chunk-size.patch" +md5sums="efe6e25213e8494cb0ef49d770ff328d rtmpdump-2.4_git20160909.tar.gz +8a6331a036a40c8be551e472bc2fe11c fix-chunk-size.patch" +sha256sums="618f37762a4aea7a1a357d75479fa8e85198b761ca8c6c50d675e650b27f7991 rtmpdump-2.4_git20160909.tar.gz +99f4204f1bb18709cc85235f6e041125f221e181e091525eea19f17c713fab43 fix-chunk-size.patch" +sha512sums="e42eda75679addb6f919f42ddce2d27a6988f505602bb70ecb4d071324b59f21d573f8b73fda3b29960c095e20303b84f6eb6254cd327803430d8065cf5d172b rtmpdump-2.4_git20160909.tar.gz +f97b4780fb8cfffccf59785c5a89c8d4929e21ec587192f10602caaf9a0b008dfbfebaa09db1d9d955fc9911fc443d76bf19972cc59fedfab5a8889f7fe70b5d fix-chunk-size.patch" diff --git a/main/rtmpdump/fix-chunk-size.patch b/main/rtmpdump/fix-chunk-size.patch index 1e138b8e40..b714273273 100644 --- a/main/rtmpdump/fix-chunk-size.patch +++ b/main/rtmpdump/fix-chunk-size.patch @@ -1,32 +1,45 @@ -diff -ru rtmpdump-2.4_git20141231.orig/librtmp/rtmp.c rtmpdump-2.4_git20141231/librtmp/rtmp.c ---- rtmpdump-2.4_git20141231.orig/librtmp/rtmp.c 2014-07-07 10:15:59.000000000 +0300 -+++ rtmpdump-2.4_git20141231/librtmp/rtmp.c 2016-06-19 21:31:48.898114687 +0300 -@@ -127,7 +127,7 @@ - - static int HandleInvoke(RTMP *r, const char *body, unsigned int nBodySize); - static int HandleMetadata(RTMP *r, char *body, unsigned int len); --static void HandleChangeChunkSize(RTMP *r, const RTMPPacket *packet); -+static void HandleChangeChunkSize(RTMP *r, RTMPPacket *packet); - static void HandleAudio(RTMP *r, const RTMPPacket *packet); - static void HandleVideo(RTMP *r, const RTMPPacket *packet); - static void HandleCtrl(RTMP *r, const RTMPPacket *packet); -@@ -3339,13 +3339,19 @@ +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 void --HandleChangeChunkSize(RTMP *r, const RTMPPacket *packet) -+HandleChangeChunkSize(RTMP *r, RTMPPacket *packet) + 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) { - if (packet->m_nBodySize >= 4) - { + 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__); -+ RTMP_SendPacket(r, packet, FALSE); -+ r->m_outChunkSize = r->m_inChunkSize; ++ SendClientChunkSize(r, r->m_inChunkSize); + } } } |