mirror of
https://gitee.com/xia-chu/ZLMediaKit.git
synced 2026-05-10 04:27:49 +08:00
除以0错误
有的rtsp设备无此参数,不能除以0
This commit is contained in:
parent
036b36f012
commit
a7953fdbca
@ -450,7 +450,7 @@ void RtspPlayer::handleResPAUSE(const Parser& parser, bool bPause) {
|
|||||||
auto strRtpTime = FindField(strTrack.data(), "rtptime=", ";");
|
auto strRtpTime = FindField(strTrack.data(), "rtptime=", ";");
|
||||||
auto idx = getTrackIndexByControlSuffix(strControlSuffix);
|
auto idx = getTrackIndexByControlSuffix(strControlSuffix);
|
||||||
if(idx != -1){
|
if(idx != -1){
|
||||||
_aiFistStamp[idx] = atoll(strRtpTime.data()) * 1000 / _aTrackInfo[idx]->_samplerate;
|
_aiFistStamp[idx] = _aTrackInfo[idx]->_samplerate>0?atoll(strRtpTime.data()) * 1000 / _aTrackInfo[idx]->_samplerate :1;
|
||||||
_aiNowStamp[idx] = _aiFistStamp[idx];
|
_aiNowStamp[idx] = _aiFistStamp[idx];
|
||||||
DebugL << "rtptime(ms):" << strControlSuffix <<" " << strRtpTime;
|
DebugL << "rtptime(ms):" << strControlSuffix <<" " << strRtpTime;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user