mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-25 04:08:57 +08:00
修复addstreamproxy拉流瞬间超时的问题 (#3093)
This commit is contained in:
parent
8682a655d7
commit
d21bdc35c9
@ -555,6 +555,9 @@ void addStreamProxy(const string &vhost, const string &app, const string &stream
|
||||
auto player = std::make_shared<PlayerProxy>(vhost, app, stream, option, retry_count);
|
||||
s_proxyMap[key] = player;
|
||||
|
||||
// 先透传参数
|
||||
player->mINI::operator=(args);
|
||||
|
||||
//指定RTP over TCP(播放rtsp时有效)
|
||||
(*player)[Client::kRtpType] = rtp_type;
|
||||
|
||||
@ -577,7 +580,6 @@ void addStreamProxy(const string &vhost, const string &app, const string &stream
|
||||
lock_guard<recursive_mutex> lck(s_proxyMapMtx);
|
||||
s_proxyMap.erase(key);
|
||||
});
|
||||
player->mINI::operator=(args);
|
||||
player->play(url);
|
||||
};
|
||||
|
||||
|
@ -42,7 +42,9 @@ void MediaPlayer::play(const string &url) {
|
||||
_delegate->setOnPlayResult(_on_play_result);
|
||||
_delegate->setOnResume(_on_resume);
|
||||
_delegate->setMediaSource(_media_src);
|
||||
_delegate->mINI::operator=(*this);
|
||||
for (auto &pr : *this) {
|
||||
(*_delegate)[pr.first] = pr.second;
|
||||
}
|
||||
_delegate->play(url);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user