From d295d9bd4cc9c4d8a281c2a523968e1177c3ffa7 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Wed, 24 Apr 2019 09:25:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=BD=E7=95=A5=E4=B8=80=E4=BA=9B=E6=97=A0?= =?UTF-8?q?=E6=95=88rtp=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Rtsp/RtpReceiver.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Rtsp/RtpReceiver.cpp b/src/Rtsp/RtpReceiver.cpp index e36c89e7..80cb170f 100644 --- a/src/Rtsp/RtpReceiver.cpp +++ b/src/Rtsp/RtpReceiver.cpp @@ -98,7 +98,9 @@ bool RtpReceiver::handleOneRtp(int iTrackidx,SdpTrack::Ptr &track, unsigned char ext = (AV_RB16(pucData + rtppt.offset - 2) + 1) << 2; rtppt.offset += ext; } - + if(rtppt.length - rtppt.offset <= 0){ + return false; + } memcpy(rtppt.payload + 4, pucData, uiLen); /////////////////////////////////RTP排序逻辑///////////////////////////////////