From e495dfca64027e25dbb81746dc1ff7d1867453fe Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Sat, 10 Apr 2021 21:58:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BF=BD=E7=95=A5g711a(pt=3D?= =?UTF-8?q?0)=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webrtc/WebRtcTransport.cpp | 2 +- webrtc/WebRtcTransport.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/webrtc/WebRtcTransport.cpp b/webrtc/WebRtcTransport.cpp index 342dabc0..9a58fb21 100644 --- a/webrtc/WebRtcTransport.cpp +++ b/webrtc/WebRtcTransport.cpp @@ -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; } diff --git a/webrtc/WebRtcTransport.h b/webrtc/WebRtcTransport.h index 2b8f8a2c..50f45604 100644 --- a/webrtc/WebRtcTransport.h +++ b/webrtc/WebRtcTransport.h @@ -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源