mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-29 22:55:52 +08:00
防止代理失败不重试的bug
This commit is contained in:
parent
9ef5a11579
commit
e92ad6b5b8
@ -31,7 +31,6 @@ void PlayerProxy::play(const char* strUrl, const char *strUser,
|
|||||||
string strPwdTmp(strPwd);
|
string strPwdTmp(strPwd);
|
||||||
|
|
||||||
m_pPlayer.reset(new MediaPlayer());
|
m_pPlayer.reset(new MediaPlayer());
|
||||||
m_pPlayer->play(strUrl, strUser, strPwd, eType);
|
|
||||||
weak_ptr<PlayerProxy> weakSelf = shared_from_this();
|
weak_ptr<PlayerProxy> weakSelf = shared_from_this();
|
||||||
m_pPlayer->setOnVideoCB( [weakSelf,strUrlTmp](const H264Frame &data ) {
|
m_pPlayer->setOnVideoCB( [weakSelf,strUrlTmp](const H264Frame &data ) {
|
||||||
auto strongSelf = weakSelf.lock();
|
auto strongSelf = weakSelf.lock();
|
||||||
@ -92,6 +91,7 @@ void PlayerProxy::play(const char* strUrl, const char *strUser,
|
|||||||
strongSelf->expired();
|
strongSelf->expired();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
m_pPlayer->play(strUrl, strUser, strPwd, eType);
|
||||||
}
|
}
|
||||||
|
|
||||||
PlayerProxy::~PlayerProxy() {
|
PlayerProxy::~PlayerProxy() {
|
||||||
|
Loading…
Reference in New Issue
Block a user