mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
rtp推流解析出frame才刷新保活计时器
This commit is contained in:
parent
de96a4f0c8
commit
fb4435fca9
@ -115,7 +115,6 @@ bool RtpProcess::inputRtp(const Socket::Ptr &sock, const char *data, int data_le
|
|||||||
}
|
}
|
||||||
|
|
||||||
_total_bytes += data_len;
|
_total_bytes += data_len;
|
||||||
_last_rtp_time.resetTime();
|
|
||||||
bool ret = handleOneRtp(0,_track,(unsigned char *)data,data_len);
|
bool ret = handleOneRtp(0,_track,(unsigned char *)data,data_len);
|
||||||
if(dts_out){
|
if(dts_out){
|
||||||
*dts_out = _dts;
|
*dts_out = _dts;
|
||||||
@ -169,6 +168,7 @@ void RtpProcess::onRtpDecode(const uint8_t *packet, int bytes, uint32_t timestam
|
|||||||
}
|
}
|
||||||
|
|
||||||
void RtpProcess::inputFrame(const Frame::Ptr &frame){
|
void RtpProcess::inputFrame(const Frame::Ptr &frame){
|
||||||
|
_last_rtp_time.resetTime();
|
||||||
_dts = frame->dts();
|
_dts = frame->dts();
|
||||||
if (_save_file_video && frame->getTrackType() == TrackVideo) {
|
if (_save_file_video && frame->getTrackType() == TrackVideo) {
|
||||||
fwrite((uint8_t *) frame->data(), frame->size(), 1, _save_file_video.get());
|
fwrite((uint8_t *) frame->data(), frame->size(), 1, _save_file_video.get());
|
||||||
|
Loading…
Reference in New Issue
Block a user