From a7476e436ad5aff0fecd455e0e91a51db83a5cb7 Mon Sep 17 00:00:00 2001 From: alexliyu7352 Date: Fri, 1 Apr 2022 20:59:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DHlsPlayer=E6=92=AD=E6=94=BE?= =?UTF-8?q?=E5=99=A8BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 当拉取加密流时, 因为不能正常播放, 所以不会触发playresult. 因此一直不会回调api请求. --- src/Player/PlayerProxy.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Player/PlayerProxy.cpp b/src/Player/PlayerProxy.cpp index 19c892aa..688befc2 100644 --- a/src/Player/PlayerProxy.cpp +++ b/src/Player/PlayerProxy.cpp @@ -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) {