From 8b7986b4fc68c376fd3f6d651453fa9bc643647a Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Tue, 25 Dec 2018 09:30:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=B6=E9=97=B4=E6=88=B3?= =?UTF-8?q?=E6=BA=A2=E5=87=BA=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MediaFile/HLSMaker.cpp | 6 +++--- src/Rtsp/RtpReceiver.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/MediaFile/HLSMaker.cpp b/src/MediaFile/HLSMaker.cpp index 83c37bf5..f5d2ee5f 100644 --- a/src/MediaFile/HLSMaker.cpp +++ b/src/MediaFile/HLSMaker.cpp @@ -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() { diff --git a/src/Rtsp/RtpReceiver.cpp b/src/Rtsp/RtpReceiver.cpp index 737954c5..f14ef433 100644 --- a/src/Rtsp/RtpReceiver.cpp +++ b/src/Rtsp/RtpReceiver.cpp @@ -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);