rtmp播放时,取相对时间戳逻辑确保时间戳同步

This commit is contained in:
xiongziliang
2020-05-06 18:54:28 +08:00
parent 920f06a996
commit a4d7b3463e
4 changed files with 54 additions and 4 deletions

View File

@@ -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){