mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 12:37:09 +08:00
优化代码
This commit is contained in:
parent
406c5477e0
commit
de96a4f0c8
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user