From 070b4d7866db41d1fd1ba14fd1d01a38ed7f7d1e Mon Sep 17 00:00:00 2001 From: Thulinma Date: Wed, 25 May 2016 14:36:44 +0200 Subject: [PATCH] RTMP push output fixes, RTMP input read fixes. --- lib/rtmpchunks.cpp | 4 ++-- src/output/output_rtmp.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rtmpchunks.cpp b/lib/rtmpchunks.cpp index 116b5bea..12b67a39 100644 --- a/lib/rtmpchunks.cpp +++ b/lib/rtmpchunks.cpp @@ -454,8 +454,8 @@ bool RTMPStream::Chunk::Parse(Socket::Buffer & buffer) { DEBUG_MSG(DLVL_DONTEVEN, "Parsing RTMP chunk result: len_left=%d, real_len=%d", len_left, real_len); - //read extended timestamp, if neccesary - if (ts_header == 0x00ffffff) { + //read extended timestamp, if necessary + if (ts_header == 0x00ffffff && headertype != 0xC0) { if (!buffer.available(i + 4)) { return false; } //can't read timestamp diff --git a/src/output/output_rtmp.cpp b/src/output/output_rtmp.cpp index 30483cdd..5eff3cb1 100644 --- a/src/output/output_rtmp.cpp +++ b/src/output/output_rtmp.cpp @@ -83,7 +83,7 @@ namespace Mist { amfReply.getContentP(2)->addContent(AMF::Object("tcUrl", "rtmp://" + host + "/" + app)); sendCommand(amfReply, 20, 0); } - RTMPStream::chunk_snd_max = 4096; + RTMPStream::chunk_snd_max = 102400; //100KiB myConn.SendNow(RTMPStream::SendCTL(1, RTMPStream::chunk_snd_max)); //send chunk size max (msg 1) { AMF::Object amfReply("container", AMF::AMF0_DDV_CONTAINER);