兼容无config包的rtmp流

This commit is contained in:
xiongziliang 2019-04-09 11:25:36 +08:00
parent 26f813b1b5
commit 507eba76c7

View File

@ -100,6 +100,13 @@ public:
_bRegisted = true;
}
} else{
if(!_bRegisted){
//强制在3秒后注册不管是否有metedata或config包
if(_ticker.createdTime() > 3 * 1000){
MediaSource::regist();
_bRegisted = true;
}
}
_mapStamp[pkt->typeId] = pkt->timeStamp;
_pRing->write(pkt,pkt->isVideoKeyFrame());
}
@ -130,6 +137,7 @@ protected:
int _iCfgFrameSize = -1;
bool _bAsyncRegist = false;
bool _bRegisted = false;
Ticker _ticker;
};
} /* namespace mediakit */