修复忽略g711a(pt=0)的bug

This commit is contained in:
xiongziliang 2021-04-10 21:58:27 +08:00
parent 5b7974a522
commit e495dfca64
2 changed files with 2 additions and 2 deletions

View File

@ -593,7 +593,7 @@ void WebRtcTransportImp::onBeforeSortedRtp(const RtpPayloadInfo &info, const Rtp
void WebRtcTransportImp::onSendRtp(const RtpPacket::Ptr &rtp, bool flush){
auto &pt = _send_rtp_pt[rtp->type];
if (!pt) {
if (pt == 0xFF) {
//忽略,对方不支持该编码类型
return;
}

View File

@ -212,7 +212,7 @@ private:
//rtc rtp推流的视频ssrc
uint32_t _recv_video_ssrc;
//记录协商的rtp的pt类型
uint8_t _send_rtp_pt[2] = {0, 0};
uint8_t _send_rtp_pt[2] = {0xFF, 0xFF};
//复合udp端口接收一切rtp与rtcp
Socket::Ptr _socket;
//推流的rtsp源