优化代码

This commit is contained in:
xiongziliang 2020-05-28 18:19:39 +08:00
parent 406c5477e0
commit de96a4f0c8

View File

@ -142,11 +142,6 @@ public:
_muxer->addTrack(track);
track->addDelegate(_muxer);
}
if(_recreate_metadata){
//需要重新生成metadata
Metadata::addTrack(_metadata,track);
}
}
/**
@ -156,8 +151,11 @@ public:
setTrackSource(_muxer);
_all_track_ready = true;
if(_recreate_metadata){
if (_recreate_metadata) {
//更新metadata
for (auto &track : _muxer->getTracks()) {
Metadata::addTrack(_metadata, track);
}
RtmpMediaSource::updateMetaData(_metadata);
}
}