兼容时间戳不规范的H265流:#894

This commit is contained in:
ziyue
2021-06-15 12:55:55 +08:00
parent 24ab876fdb
commit 4d0db1b7c1
2 changed files with 17 additions and 5 deletions

View File

@@ -169,7 +169,7 @@ void H265RtmpEncoder::inputFrame(const Frame::Ptr &frame) {
return;
}
if(_lastPacket && _lastPacket->time_stamp != frame->dts()) {
if (_lastPacket && (_lastPacket->time_stamp != frame->dts() || type == H265Frame::NAL_TRAIL_R)) {
RtmpCodec::inputRtmp(_lastPacket);
_lastPacket = nullptr;
}