mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-05 10:58:11 +08:00
rtmp播放时,取相对时间戳逻辑确保时间戳同步
This commit is contained in:
@@ -50,6 +50,9 @@ void FlvMuxer::start(const EventPoller::Ptr &poller,const RtmpMediaSource::Ptr &
|
||||
}
|
||||
strongSelf->onDetach();
|
||||
});
|
||||
|
||||
//音频同步于视频
|
||||
_stamp[0].makeRelation( _stamp[1]);
|
||||
_ring_reader->setReadCB([weakSelf](const RtmpMediaSource::RingDataType &pkt){
|
||||
auto strongSelf = weakSelf.lock();
|
||||
if(!strongSelf){
|
||||
|
||||
@@ -266,6 +266,8 @@ void RtmpSession::sendPlayResponse(const string &err,const RtmpMediaSource::Ptr
|
||||
onSendMedia(pkt);
|
||||
});
|
||||
|
||||
//音频同步于视频
|
||||
_stamp[0].makeRelation( _stamp[1]);
|
||||
_pRingReader = src->getRing()->attach(getPoller());
|
||||
weak_ptr<RtmpSession> weakSelf = dynamic_pointer_cast<RtmpSession>(shared_from_this());
|
||||
_pRingReader->setReadCB([weakSelf](const RtmpMediaSource::RingDataType &pkt) {
|
||||
|
||||
Reference in New Issue
Block a user