Commit f881860a by xiongziliang

修复除0 bug

parent 9da5a355
...@@ -55,6 +55,10 @@ bool RtpReceiver::handleOneRtp(int iTrackidx,SdpTrack::Ptr &track, unsigned char ...@@ -55,6 +55,10 @@ bool RtpReceiver::handleOneRtp(int iTrackidx,SdpTrack::Ptr &track, unsigned char
rtppt.sequence = ntohs(rtppt.sequence); rtppt.sequence = ntohs(rtppt.sequence);
//时间戳 //时间戳
memcpy(&rtppt.timeStamp, pucData+4, 4);//内存对齐 memcpy(&rtppt.timeStamp, pucData+4, 4);//内存对齐
if(!track->_samplerate){
return false;
}
//时间戳转换成毫秒 //时间戳转换成毫秒
rtppt.timeStamp = ntohl(rtppt.timeStamp) * 1000L / track->_samplerate; rtppt.timeStamp = ntohl(rtppt.timeStamp) * 1000L / track->_samplerate;
//ssrc //ssrc
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论