From f881860adb61e58428e575247d346d9169177951 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Fri, 14 Dec 2018 18:24:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=99=A40=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Rtsp/RtpReceiver.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Rtsp/RtpReceiver.cpp b/src/Rtsp/RtpReceiver.cpp index 236484ae..737954c5 100644 --- a/src/Rtsp/RtpReceiver.cpp +++ b/src/Rtsp/RtpReceiver.cpp @@ -55,6 +55,10 @@ bool RtpReceiver::handleOneRtp(int iTrackidx,SdpTrack::Ptr &track, unsigned char rtppt.sequence = ntohs(rtppt.sequence); //时间戳 memcpy(&rtppt.timeStamp, pucData+4, 4);//内存对齐 + + if(!track->_samplerate){ + return false; + } //时间戳转换成毫秒 rtppt.timeStamp = ntohl(rtppt.timeStamp) * 1000L / track->_samplerate; //ssrc