From 3a2a60c40a64ab31966c95a92bb05db7535bd243 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E6=A5=9A?= <1213642868@qq.com> Date: Sun, 27 Feb 2022 00:33:39 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=B2=E6=AD=A2=E5=BC=80=E5=90=AF=E6=A8=A1?= =?UTF-8?q?=E6=8B=9F=E4=B8=A2=E5=8C=85=E4=BB=A3=E7=A0=81=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E7=94=9F=E6=88=90twcc=20rtcp=E7=B4=8A=E4=B9=B1=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webrtc/WebRtcTransport.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/webrtc/WebRtcTransport.cpp b/webrtc/WebRtcTransport.cpp index 65f38396..ac81bcf7 100644 --- a/webrtc/WebRtcTransport.cpp +++ b/webrtc/WebRtcTransport.cpp @@ -704,6 +704,14 @@ void WebRtcTransportImp::onRtp(const char *buf, size_t len, uint64_t stamp_ms) { } void WrappedRtpTrack::inputRtp(const char *buf, size_t len, uint64_t stamp_ms, RtpHeader *rtp) { +#if 0 + auto seq = ntohs(rtp->seq); + if (track->media->type == TrackVideo && seq % 100 == 0) { + //此处模拟接受丢包 + return; + } +#endif + auto ssrc = ntohl(rtp->ssrc); //修改ext id至统一 @@ -719,14 +727,6 @@ void WrappedRtpTrack::inputRtp(const char *buf, size_t len, uint64_t stamp_ms, R _transport.createRtpChannel(rid, ssrc, *track); } - //这是普通的rtp数据 -#if 0 - auto seq = ntohs(rtp->seq); - if (track->media->type == TrackVideo && seq % 100 == 0) { - //此处模拟接受丢包 - return; - } -#endif //解析并排序rtp ref->inputRtp(track->media->type, track->plan_rtp->sample_rate, (uint8_t *) buf, len, false); }