兼容GB28181 tcp推流缓存覆盖的垃圾设备

This commit is contained in:
xiongziliang
2021-04-22 22:02:21 +08:00
parent 9004ad7a60
commit f70bfb5f8b
4 changed files with 88 additions and 6 deletions

View File

@@ -42,7 +42,7 @@ bool RtpReceiver::handleOneRtp(int index, TrackType type, int sample_rate, uint8
}
RtpHeader *header = (RtpHeader *) ptr;
if (header->version != RtpPacket::kRtpVersion) {
throw std::invalid_argument("非法的rtpversion字段非法");
throw BadRtpException("非法的rtpversion字段非法");
}
if (!header->getPayloadSize(len)) {
//无有效负载的rtp包