mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-04 09:47:33 +08:00
flv录制延时两秒启动,防止收集config帧不齐
This commit is contained in:
Submodule 3rdpart/ZLToolKit updated: 02d8b5df6a...f9297f31e5
@@ -44,11 +44,13 @@ void FlvMuxer::start(const EventPoller::Ptr &poller,const RtmpMediaSource::Ptr &
|
||||
}
|
||||
if(!poller->isCurrentThread()){
|
||||
weak_ptr<FlvMuxer> weakSelf = getSharedPtr();
|
||||
poller->async([weakSelf,poller,media](){
|
||||
//延时两秒启动录制,目的是为了等待config帧收集完毕
|
||||
poller->doDelayTask(2000,[weakSelf,poller,media](){
|
||||
auto strongSelf = weakSelf.lock();
|
||||
if(strongSelf){
|
||||
strongSelf->start(poller,media);
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user