mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-10-31 16:47:28 +08:00
优化代码
This commit is contained in:
parent
e69cbc1486
commit
57043138d8
@ -240,19 +240,9 @@ private:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto &helper = it->second;
|
if(it->second->getSchema() == schema){
|
||||||
if(!helper){
|
// 绑定的协议一致,替换tracks
|
||||||
// 对象不存在,创建之
|
it->second->attachTracks(std::move(tracks));
|
||||||
auto recorder = MediaSinkInterface::Ptr(createRecorder(vhost, app, stream));
|
|
||||||
if (recorder) {
|
|
||||||
_recorder_map[key] = std::make_shared<RecorderHelper>(recorder, std::move(tracks), false, schema);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(helper->getSchema() == schema){
|
|
||||||
// 对象存在且绑定的协议一致,替换tracks
|
|
||||||
helper->attachTracks(std::move(tracks));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user