Merge branch 'master' of github.com:ZLMediaKit/ZLMediaKit

This commit is contained in:
ziyue
2021-12-22 14:06:46 +08:00
6 changed files with 159 additions and 52 deletions

View File

@@ -324,6 +324,12 @@ void HlsDemuxer::start(const EventPoller::Ptr &poller, TrackListener *listener)
}
bool HlsDemuxer::inputFrame(const Frame::Ptr &frame) {
//为了避免track准备时间过长, 因此在没准备好之前, 直接消费掉所有的帧
if (!_delegate.isAllTrackReady()) {
_delegate.inputFrame(frame);
return true;
}
//计算相对时间戳
int64_t dts, pts;
_stamp[frame->getTrackType()].revise(frame->dts(), frame->pts(), dts, pts);