解决GB28181推流无ntp时间戳导致的问题

This commit is contained in:
xiongziliang
2021-08-21 18:52:52 +08:00
parent ce41fa268e
commit 41c09757a7
3 changed files with 15 additions and 4 deletions

View File

@@ -27,10 +27,13 @@ static inline bool checkTS(const uint8_t *packet, size_t bytes){
class RtpReceiverImp : public RtpTrackImp {
public:
using Ptr = std::shared_ptr<RtpReceiverImp>;
RtpReceiverImp(int sample_rate, RtpTrackImp::OnSorted cb, RtpTrackImp::BeforeSorted cb_before = nullptr){
RtpReceiverImp(int sample_rate, RtpTrackImp::OnSorted cb, RtpTrackImp::BeforeSorted cb_before = nullptr) {
_sample_rate = sample_rate;
setOnSorted(std::move(cb));
setBeforeSorted(std::move(cb_before));
//GB28181推流不支持ntp时间戳
setNtpStamp(0, 0, 0);
}
~RtpReceiverImp() override = default;