mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 10:40:05 +08:00
解析rtp时,兼容rtsp服务端发送缓冲区溢出覆盖的bug
This commit is contained in:
parent
68c0424808
commit
189b02e400
@ -13,6 +13,7 @@
|
|||||||
#include "Util/util.h"
|
#include "Util/util.h"
|
||||||
#include "Util/logger.h"
|
#include "Util/logger.h"
|
||||||
#include "Common/macros.h"
|
#include "Common/macros.h"
|
||||||
|
#include "Rtsp/RtpReceiver.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace toolkit;
|
using namespace toolkit;
|
||||||
@ -59,7 +60,11 @@ const char *RtspSplitter::onSearchPacketTail_l(const char *data, size_t len) {
|
|||||||
|
|
||||||
ssize_t RtspSplitter::onRecvHeader(const char *data, size_t len) {
|
ssize_t RtspSplitter::onRecvHeader(const char *data, size_t len) {
|
||||||
if (_isRtpPacket) {
|
if (_isRtpPacket) {
|
||||||
onRtpPacket(data, len);
|
try {
|
||||||
|
onRtpPacket(data, len);
|
||||||
|
} catch (RtpTrack::BadRtpException &ex) {
|
||||||
|
WarnL << ex.what();
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (len == 4 && !memcmp(data, "\r\n\r\n", 4)) {
|
if (len == 4 && !memcmp(data, "\r\n\r\n", 4)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user