diff --git a/3rdpart/ZLToolKit b/3rdpart/ZLToolKit index 02d8b5df..f9297f31 160000 --- a/3rdpart/ZLToolKit +++ b/3rdpart/ZLToolKit @@ -1 +1 @@ -Subproject commit 02d8b5df6a93cc84b605a548220fd552061e66c5 +Subproject commit f9297f31e570e4ca6f3ab1bee32eadebfbee1c1f diff --git a/src/RtmpMuxer/FlvMuxer.cpp b/src/RtmpMuxer/FlvMuxer.cpp index ddb15317..6354b40a 100644 --- a/src/RtmpMuxer/FlvMuxer.cpp +++ b/src/RtmpMuxer/FlvMuxer.cpp @@ -44,11 +44,13 @@ void FlvMuxer::start(const EventPoller::Ptr &poller,const RtmpMediaSource::Ptr & } if(!poller->isCurrentThread()){ weak_ptr 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; }