From 34bbfc8bcbc039898c49380d0dabbbd098ddc7f8 Mon Sep 17 00:00:00 2001 From: xia-chu <771730766@qq.com> Date: Thu, 4 Feb 2021 18:09:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91=E8=AD=A6?= =?UTF-8?q?=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Http/HttpSession.cpp | 2 +- src/Rtsp/RtpReceiver.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Http/HttpSession.cpp b/src/Http/HttpSession.cpp index 2ad7eaef..7b2ff254 100644 --- a/src/Http/HttpSession.cpp +++ b/src/Http/HttpSession.cpp @@ -515,7 +515,7 @@ void HttpSession::sendResponse(int code, if(no_content_length){ //http-flv直播是Keep-Alive类型 bClose = false; - }else if(size >= SIZE_MAX || size < 0 ){ + }else if((size_t) size >= SIZE_MAX || size < 0 ){ //不固定长度的body,那么发送完body后应该关闭socket,以便浏览器做下载完毕的判断 bClose = true; } diff --git a/src/Rtsp/RtpReceiver.h b/src/Rtsp/RtpReceiver.h index 00edcb95..0ee16c27 100644 --- a/src/Rtsp/RtpReceiver.h +++ b/src/Rtsp/RtpReceiver.h @@ -62,7 +62,7 @@ public: */ void sortPacket(SEQ seq, T packet) { if (seq < _next_seq_out) { - if (_next_seq_out - seq < kMax) { + if (_next_seq_out < seq + kMax) { //过滤seq回退包(回环包除外) return; }