mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-07 04:08:13 +08:00
Merge branch 'master' of https://gitee.com/xia-chu/ZLMediaKit into dev
This commit is contained in:
@@ -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("非法的rtp,version字段非法");
|
||||
throw BadRtpException("非法的rtp,version字段非法");
|
||||
}
|
||||
if (!header->getPayloadSize(len)) {
|
||||
//无有效负载的rtp包
|
||||
|
||||
@@ -165,6 +165,13 @@ public:
|
||||
RtpReceiver();
|
||||
virtual ~RtpReceiver();
|
||||
|
||||
class BadRtpException : public invalid_argument {
|
||||
public:
|
||||
template<typename Type>
|
||||
BadRtpException(Type &&type) : invalid_argument(std::forward<Type>(type)) {}
|
||||
~BadRtpException() = default;
|
||||
};
|
||||
|
||||
protected:
|
||||
/**
|
||||
* 输入数据指针生成并排序rtp包
|
||||
|
||||
Reference in New Issue
Block a user