修复直接拉流代理失效的bug
This commit is contained in:
parent
a9be01fbec
commit
2dd87c8b59
|
|
@ -117,7 +117,10 @@ void PlayerProxy::play(const string &strUrlTmp) {
|
|||
});
|
||||
MediaPlayer::play(strUrlTmp);
|
||||
_pull_url = strUrlTmp;
|
||||
setDirectProxy();
|
||||
}
|
||||
|
||||
void PlayerProxy::setDirectProxy(){
|
||||
MediaSource::Ptr mediaSource;
|
||||
if (dynamic_pointer_cast<RtspPlayer>(_delegate)) {
|
||||
//rtsp拉流
|
||||
|
|
@ -150,6 +153,7 @@ void PlayerProxy::rePlay(const string &strUrl,int iFailedCnt){
|
|||
}
|
||||
WarnL << "重试播放[" << iFailedCnt << "]:" << strUrl;
|
||||
strongPlayer->MediaPlayer::play(strUrl);
|
||||
strongPlayer->setDirectProxy();
|
||||
return false;
|
||||
}, getPoller());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ private:
|
|||
|
||||
void rePlay(const string &strUrl,int iFailedCnt);
|
||||
void onPlaySuccess();
|
||||
void setDirectProxy();
|
||||
|
||||
private:
|
||||
bool _enable_hls;
|
||||
|
|
|
|||
Loading…
Reference in New Issue