mirror of
https://gitee.com/xia-chu/ZLMediaKit.git
synced 2026-05-23 01:57:50 +08:00
修复除0 bug
This commit is contained in:
parent
9da5a35524
commit
f881860adb
@ -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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user