From 32da13114a8aba09876ce4fab35f0527b5446e5f Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Wed, 27 Mar 2019 19:02:22 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=A8=8B=E5=BA=8F=E9=80=80?= =?UTF-8?q?=E5=87=BA=E5=BC=82=E5=B8=B8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_pusher.cpp | 2 ++ tests/test_pusherMp4.cpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_pusher.cpp b/tests/test_pusher.cpp index 836cf382..cb2efea6 100644 --- a/tests/test_pusher.cpp +++ b/tests/test_pusher.cpp @@ -103,6 +103,8 @@ int domain(const string &playUrl, const string &pushUrl) { static semaphore sem; signal(SIGINT, [](int) { sem.post(); });// 设置退出信号 sem.wait(); + pusher.reset(); + g_timer.reset(); return 0; } diff --git a/tests/test_pusherMp4.cpp b/tests/test_pusherMp4.cpp index 89ae36de..d67ac45a 100644 --- a/tests/test_pusherMp4.cpp +++ b/tests/test_pusherMp4.cpp @@ -103,8 +103,9 @@ int domain(const string & filePath,const string & pushUrl){ //app必须record,filePath(流id)为相对于httpRoot/record的路径,否则MediaReader会找到不该文件 //限制app为record是为了防止服务器上的文件被肆意访问 createPusher(FindField(pushUrl.data(), nullptr,"://"),DEFAULT_VHOST,appName,filePath,pushUrl); - sem.wait(); + pusher.reset(); + g_timer.reset(); return 0; }