Init and deinit SRT properly
This commit is contained in:
parent
110c1a0013
commit
5288d862e0
2 changed files with 4 additions and 0 deletions
|
@ -169,6 +169,7 @@ namespace Mist{
|
||||||
|
|
||||||
/// Live Setup of SRT Input. Runs only if we are the "main" thread
|
/// Live Setup of SRT Input. Runs only if we are the "main" thread
|
||||||
bool InputTSSRT::preRun(){
|
bool InputTSSRT::preRun(){
|
||||||
|
Socket::SRT::libraryInit();
|
||||||
rawMode = config->getBool("raw");
|
rawMode = config->getBool("raw");
|
||||||
if (rawMode){INFO_MSG("Entering raw mode");}
|
if (rawMode){INFO_MSG("Entering raw mode");}
|
||||||
if (srtConn.getSocket() == -1){
|
if (srtConn.getSocket() == -1){
|
||||||
|
@ -301,6 +302,7 @@ namespace Mist{
|
||||||
HIGH_MSG("Spawned new thread for socket %i", S.getSocket());
|
HIGH_MSG("Spawned new thread for socket %i", S.getSocket());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Socket::SRT::libraryCleanup();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// If we are here: we have a proper connection (either accepted or pull input) and should start parsing it as such
|
// If we are here: we have a proper connection (either accepted or pull input) and should start parsing it as such
|
||||||
|
|
|
@ -473,6 +473,7 @@ static void callThreadCallbackSRT(void *srtPtr){
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[]){
|
int main(int argc, char *argv[]){
|
||||||
|
Socket::SRT::libraryInit();
|
||||||
DTSC::trackValidMask = TRACK_VALID_EXT_HUMAN;
|
DTSC::trackValidMask = TRACK_VALID_EXT_HUMAN;
|
||||||
Util::redirectLogsIfNeeded();
|
Util::redirectLogsIfNeeded();
|
||||||
Util::Config conf(argv[0]);
|
Util::Config conf(argv[0]);
|
||||||
|
@ -563,5 +564,6 @@ int main(int argc, char *argv[]){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
INFO_MSG("Exit reason: %s", Util::exitReason);
|
INFO_MSG("Exit reason: %s", Util::exitReason);
|
||||||
|
Socket::SRT::libraryCleanup();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue