修复除0 bug

This commit is contained in:
xiongziliang 2018-12-14 18:24:27 +08:00
parent 9da5a35524
commit f881860adb

View File

@ -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