mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-21 01:13:37 +08:00
无metadata且不能获取Track的rtmp确保能注册
This commit is contained in:
parent
41509800bc
commit
406c5477e0
@ -107,6 +107,14 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新metadata
|
||||
*/
|
||||
void updateMetaData(const AMFValue &metadata) {
|
||||
lock_guard<recursive_mutex> lock(_mtx);
|
||||
_metadata = metadata;
|
||||
}
|
||||
|
||||
/**
|
||||
* 输入rtmp包
|
||||
* @param pkt rtmp包
|
||||
|
@ -53,9 +53,8 @@ public:
|
||||
//该metadata无效,需要重新生成
|
||||
_metadata = metadata;
|
||||
_recreate_metadata = true;
|
||||
}else{
|
||||
RtmpMediaSource::setMetaData(metadata);
|
||||
}
|
||||
RtmpMediaSource::setMetaData(metadata);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -158,8 +157,8 @@ public:
|
||||
_all_track_ready = true;
|
||||
|
||||
if(_recreate_metadata){
|
||||
//需要重新生成metadata
|
||||
RtmpMediaSource::setMetaData(_metadata);
|
||||
//更新metadata
|
||||
RtmpMediaSource::updateMetaData(_metadata);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user