Commit 8b7986b4 by xiongziliang

修改时间戳溢出的bug

parent a904a421
......@@ -162,11 +162,11 @@ void HLSMaker::inputH264(const Frame::Ptr &frame) {
case H264Frame::NAL_B_P: //P
//insert aud frame before p and SPS frame
if(dts != _ui32LastFrameStamp){
_ts.inputH264("\x0\x0\x0\x1\x9\xf0", 6, dts * 90L , frame->pts() * 90L);
_ts.inputH264("\x0\x0\x0\x1\x9\xf0", 6, dts * 90LL , frame->pts() * 90LL);
}
case H264Frame::NAL_IDR: //IDR
case H264Frame::NAL_PPS: //PPS
_ts.inputH264(frame->data(), frame->size(), dts * 90L , frame->pts() * 90L);
_ts.inputH264(frame->data(), frame->size(), dts * 90LL , frame->pts() * 90LL);
break;
default:
break;
......@@ -176,7 +176,7 @@ void HLSMaker::inputH264(const Frame::Ptr &frame) {
}
void HLSMaker::inputAAC(const Frame::Ptr &frame) {
_ts.inputAAC(frame->data(), frame->size(), frame->dts() * 90L , frame->pts() * 90L);
_ts.inputAAC(frame->data(), frame->size(), frame->dts() * 90LL , frame->pts() * 90LL);
}
bool HLSMaker::removets() {
......
......@@ -60,7 +60,7 @@ bool RtpReceiver::handleOneRtp(int iTrackidx,SdpTrack::Ptr &track, unsigned char
return false;
}
//时间戳转换成毫秒
rtppt.timeStamp = ntohl(rtppt.timeStamp) * 1000L / track->_samplerate;
rtppt.timeStamp = ntohl(rtppt.timeStamp) * 1000LL / track->_samplerate;
//ssrc
memcpy(&rtppt.ssrc,pucData+8,4);//内存对齐
rtppt.ssrc = ntohl(rtppt.ssrc);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论