rtmp推流时,确保config帧收完后再注册

This commit is contained in:
xiongziliang 2019-09-23 16:53:04 +08:00
parent cb7c72d9d9
commit 1fda56ab6e

View File

@ -489,7 +489,7 @@ void RtmpSession::onRtmpChunk(RtmpPacket &chunkData) {
_stamp[chunkData.typeId % 2].revise(0, 0, dts_out, dts_out);
chunkData.timeStamp = dts_out;
}
if(!_metadata_got){
if(!_metadata_got && !chunkData.isCfgFrame()){
//有些rtmp推流客户端不产生metadata我们产生一个默认的metadata目的是为了触发注册操作
_metadata_got = true;
_pPublisherSrc->onGetMetaData(TitleMeta().getMetadata());