修复Windows编译问题

This commit is contained in:
ziyue 2022-07-29 14:19:16 +08:00
parent 7d8b212a3c
commit 5babe63cdb

View File

@ -8,11 +8,13 @@
* may be found in the AUTHORS file in the root of the source tree.
*/
#include <algorithm>
#include "RtmpProtocol.h"
#include "Rtmp/utils.h"
#include "RtmpMediaSource.h"
using namespace toolkit;
using namespace std;
using namespace toolkit;
#define C1_DIGEST_SIZE 32
#define C1_KEY_SIZE 128
@ -752,7 +754,7 @@ void RtmpProtocol::handle_chunk(RtmpPacket::Ptr packet) {
case MSG_WIN_SIZE: {
//如果窗口太小会导致发送sendAcknowledgement时无限递归https://github.com/ZLMediaKit/ZLMediaKit/issues/1839
_windows_size = std::max(load_be32(&chunk_data.buffer[0]), 32 * 1024U);
_windows_size = max(load_be32(&chunk_data.buffer[0]), 32 * 1024U);
TraceL << "MSG_WIN_SIZE:" << _windows_size;
break;
}