mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
解决某些设备推流无法播放的问题
This commit is contained in:
parent
5d7ed15355
commit
dddc167fb0
@ -94,16 +94,14 @@ public:
|
||||
}
|
||||
}
|
||||
virtual void onGetMedia(const RtmpPacket::Ptr &pkt) {
|
||||
if(!m_bRegisted){
|
||||
lock_guard<recursive_mutex> lock(m_mtxMap);
|
||||
if (m_mapCfgFrame.size() != m_iCfgFrameSize && pkt->isCfgFrame()) {
|
||||
m_mapCfgFrame.emplace(pkt->typeId, pkt);
|
||||
lock_guard<recursive_mutex> lock(m_mtxMap);
|
||||
if (pkt->isCfgFrame()) {
|
||||
m_mapCfgFrame.emplace(pkt->typeId, pkt);
|
||||
|
||||
if( m_mapCfgFrame.size() == m_iCfgFrameSize && m_bAsyncRegist){
|
||||
m_bAsyncRegist = false;
|
||||
MediaSource::regist();
|
||||
m_bRegisted = true;
|
||||
}
|
||||
if(m_bAsyncRegist && !m_bRegisted && m_mapCfgFrame.size() == m_iCfgFrameSize){
|
||||
m_bAsyncRegist = false;
|
||||
MediaSource::regist();
|
||||
m_bRegisted = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user