From ae5482ec61c94426d6328523419057e1c79022fa Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Sun, 24 Jun 2018 14:49:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Drtmp=E6=8E=A8=E6=B5=81?= =?UTF-8?q?=E5=99=A8bug/=E6=9B=B4=E6=96=B0=E7=BD=91=E7=BB=9C=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ZLToolKit | 2 +- src/Rtmp/RtmpPusher.h | 1 + tests/test_rtmpPusher.cpp | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ZLToolKit b/ZLToolKit index 44f6034f..11c368c1 160000 --- a/ZLToolKit +++ b/ZLToolKit @@ -1 +1 @@ -Subproject commit 44f6034fc0d222a15f4f8ecc1ecc4da6d7e9786b +Subproject commit 11c368c17c4f95f73d7f93bebd4573b31e2e296d diff --git a/src/Rtmp/RtmpPusher.h b/src/Rtmp/RtmpPusher.h index 9f1955a9..b0ce3dcb 100644 --- a/src/Rtmp/RtmpPusher.h +++ b/src/Rtmp/RtmpPusher.h @@ -75,6 +75,7 @@ private: if(m_onShutdown){ m_onShutdown(ex); } + m_pRtmpReader.reset(); } void onPublishResult(const SockException &ex) { m_pPublishTimer.reset(); diff --git a/tests/test_rtmpPusher.cpp b/tests/test_rtmpPusher.cpp index 3043e195..fe29af4a 100644 --- a/tests/test_rtmpPusher.cpp +++ b/tests/test_rtmpPusher.cpp @@ -108,6 +108,7 @@ int domain(const string &playUrl, const string &pushUrl) { //事件轮询 EventPoller::Instance().runLoop(); + pusher.reset(); } //删除事件监听 NoticeCenter::Instance().delListener(nullptr); @@ -121,7 +122,7 @@ int domain(const string &playUrl, const string &pushUrl) { int main(int argc, char *argv[]) { - return domain("rtmp://live.hkstv.hk.lxdns.com/live/hks", "rtmp://jizan.iok.la/live/stream"); + return domain("rtmp://live.hkstv.hk.lxdns.com/live/hks", "rtmp://127.0.0.1/live/stream"); }