mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-23 11:17:09 +08:00
修复死锁的问题
This commit is contained in:
parent
f5187e8b0d
commit
ac33592319
@ -266,6 +266,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void addRecorder(MediaSource &sender){
|
void addRecorder(MediaSource &sender){
|
||||||
|
auto tracks = sender.getTracks(needTrackReady());
|
||||||
auto key = getRecorderKey(sender.getVhost(),sender.getApp(),sender.getId());
|
auto key = getRecorderKey(sender.getVhost(),sender.getApp(),sender.getId());
|
||||||
lock_guard<decltype(_recorder_mtx)> lck(_recorder_mtx);
|
lock_guard<decltype(_recorder_mtx)> lck(_recorder_mtx);
|
||||||
auto it = _recorder_map.find(key);
|
auto it = _recorder_map.find(key);
|
||||||
@ -276,7 +277,6 @@ private:
|
|||||||
|
|
||||||
if(!it->second->isRecording() || it->second->getSchema() == sender.getSchema()){
|
if(!it->second->isRecording() || it->second->getSchema() == sender.getSchema()){
|
||||||
// 绑定的协议一致或者并未正在录制则替换tracks
|
// 绑定的协议一致或者并未正在录制则替换tracks
|
||||||
auto tracks = sender.getTracks(needTrackReady());
|
|
||||||
if (!tracks.empty()) {
|
if (!tracks.empty()) {
|
||||||
it->second->attachTracks(std::move(tracks),sender.getSchema());
|
it->second->attachTracks(std::move(tracks),sender.getSchema());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user