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"); }