mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 12:37:09 +08:00
解决程序退出异常的问题
This commit is contained in:
parent
5e7260c723
commit
32da13114a
@ -103,6 +103,8 @@ int domain(const string &playUrl, const string &pushUrl) {
|
|||||||
static semaphore sem;
|
static semaphore sem;
|
||||||
signal(SIGINT, [](int) { sem.post(); });// 设置退出信号
|
signal(SIGINT, [](int) { sem.post(); });// 设置退出信号
|
||||||
sem.wait();
|
sem.wait();
|
||||||
|
pusher.reset();
|
||||||
|
g_timer.reset();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,8 +103,9 @@ int domain(const string & filePath,const string & pushUrl){
|
|||||||
//app必须record,filePath(流id)为相对于httpRoot/record的路径,否则MediaReader会找到不该文件
|
//app必须record,filePath(流id)为相对于httpRoot/record的路径,否则MediaReader会找到不该文件
|
||||||
//限制app为record是为了防止服务器上的文件被肆意访问
|
//限制app为record是为了防止服务器上的文件被肆意访问
|
||||||
createPusher(FindField(pushUrl.data(), nullptr,"://"),DEFAULT_VHOST,appName,filePath,pushUrl);
|
createPusher(FindField(pushUrl.data(), nullptr,"://"),DEFAULT_VHOST,appName,filePath,pushUrl);
|
||||||
|
|
||||||
sem.wait();
|
sem.wait();
|
||||||
|
pusher.reset();
|
||||||
|
g_timer.reset();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user