Commit 32da1311 by xiongziliang

解决程序退出异常的问题

parent 5e7260c7
......@@ -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;
}
......
......@@ -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;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论