mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 10:40:05 +08:00
完善代码
This commit is contained in:
parent
0f39565f67
commit
4c1f7babad
@ -167,14 +167,14 @@ int main(int argc, char *argv[]) {
|
||||
//休眠一秒打印
|
||||
sleep(1);
|
||||
|
||||
int alive_player = 0;
|
||||
size_t alive_player = 0;
|
||||
{
|
||||
lock_guard<recursive_mutex> lck(mtx);
|
||||
alive_player = player_map.size();
|
||||
}
|
||||
InfoL << "在线播放器个数:" << alive_player;
|
||||
int re_try = player_count - alive_player;
|
||||
while (re_try--) {
|
||||
size_t re_try = player_count - alive_player;
|
||||
while (!exit_flag && re_try--) {
|
||||
//有些播放器播放失败了,那么我们重试添加
|
||||
add_player();
|
||||
}
|
||||
|
@ -199,14 +199,14 @@ int main(int argc, char *argv[]) {
|
||||
//休眠一秒打印
|
||||
sleep(1);
|
||||
|
||||
int alive_pusher = 0;
|
||||
size_t alive_pusher = 0;
|
||||
{
|
||||
lock_guard<recursive_mutex> lck(mtx);
|
||||
alive_pusher = pusher_map.size();
|
||||
}
|
||||
InfoL << "在线推流器个数:" << alive_pusher;
|
||||
auto src = get_src();
|
||||
for(auto i = 0; i < pusher_count - alive_pusher && src && !exit_flag; ++i){
|
||||
for(size_t i = 0; i < pusher_count - alive_pusher && src && !exit_flag; ++i){
|
||||
//有些推流器失败了,那么我们重试添加
|
||||
add_pusher(get_src(), makeRandStr(8), i);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user