修复HlsPlayer播放器BUG

当拉取加密流时, 因为不能正常播放, 所以不会触发playresult.
因此一直不会回调api请求.
This commit is contained in:
alexliyu7352 2022-04-01 20:59:58 +08:00 committed by GitHub
parent d5b8613858
commit a7476e436a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -121,6 +121,11 @@ void PlayerProxy::setDirectProxy() {
PlayerProxy::~PlayerProxy() {
_timer.reset();
// 避免析构时, 忘记回调api请求
if(_on_play) {
_on_play(SockException(Err_shutdown, "player proxy close"));
_on_play = nullptr;
}
}
void PlayerProxy::rePlay(const string &strUrl, int iFailedCnt) {