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