From 3110284302795b1cdfbef84f7e31bf6f0800b8ed Mon Sep 17 00:00:00 2001 From: cqm Date: Fri, 27 May 2022 09:24:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Drtc=E5=8D=95=E7=8B=AC?= =?UTF-8?q?=E6=92=AD=E6=94=BE=E9=9F=B3=E9=A2=91=E5=BB=B6=E6=97=B6=E9=AB=98?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Rtsp/RtpReceiver.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Rtsp/RtpReceiver.cpp b/src/Rtsp/RtpReceiver.cpp index 996f70d7..3e1c1235 100644 --- a/src/Rtsp/RtpReceiver.cpp +++ b/src/Rtsp/RtpReceiver.cpp @@ -15,7 +15,8 @@ namespace mediakit { RtpTrack::RtpTrack() { setOnSort([this](uint16_t seq, RtpPacket::Ptr &packet) { - onRtpSorted(std::move(packet)); + if (packet->getPayloadSize()) + onRtpSorted(std::move(packet)); }); } @@ -49,7 +50,8 @@ RtpPacket::Ptr RtpTrack::inputRtp(TrackType type, int sample_rate, uint8_t *ptr, } if (!header->getPayloadSize(len)) { //无有效负载的rtp包 - return nullptr; + InfoL << "收到rtp空包:" << len << " seq:" << ntohs(header->seq); + //return nullptr; } //比对缓存ssrc