Commit 507eba76 by xiongziliang

兼容无config包的rtmp流

parent 26f813b1
...@@ -100,6 +100,13 @@ public: ...@@ -100,6 +100,13 @@ public:
_bRegisted = true; _bRegisted = true;
} }
} else{ } else{
if(!_bRegisted){
//强制在3秒后注册,不管是否有metedata或config包
if(_ticker.createdTime() > 3 * 1000){
MediaSource::regist();
_bRegisted = true;
}
}
_mapStamp[pkt->typeId] = pkt->timeStamp; _mapStamp[pkt->typeId] = pkt->timeStamp;
_pRing->write(pkt,pkt->isVideoKeyFrame()); _pRing->write(pkt,pkt->isVideoKeyFrame());
} }
...@@ -130,6 +137,7 @@ protected: ...@@ -130,6 +137,7 @@ protected:
int _iCfgFrameSize = -1; int _iCfgFrameSize = -1;
bool _bAsyncRegist = false; bool _bAsyncRegist = false;
bool _bRegisted = false; bool _bRegisted = false;
Ticker _ticker;
}; };
} /* namespace mediakit */ } /* namespace mediakit */
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论