Cleaner exit when stream source shuts down
This commit is contained in:
parent
d6e2da90f5
commit
69f84d4409
1 changed files with 10 additions and 4 deletions
|
@ -2080,10 +2080,16 @@ namespace Mist{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//every ~1 second, check if the stream is not offline
|
//every ~1 second, check if the stream is not offline
|
||||||
if (emptyCount % 100 == 0 && M.getLive() && Util::getStreamStatus(streamName) == STRMSTAT_OFF){
|
if (emptyCount % 100 == 0 && Util::getStreamStatus(streamName) == STRMSTAT_OFF){
|
||||||
Util::logExitReason("Stream source shut down");
|
if (M.getLive()){
|
||||||
|
Util::logExitReason("Live stream source shut down");
|
||||||
thisPacket.null();
|
thisPacket.null();
|
||||||
return true;
|
return true;
|
||||||
|
}else if (!Util::startInput(streamName)){
|
||||||
|
Util::logExitReason("VoD stream source shut down and could not be restarted");
|
||||||
|
thisPacket.null();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Fine! We didn't want a packet, anyway. Let's try again later.
|
//Fine! We didn't want a packet, anyway. Let's try again later.
|
||||||
|
|
Loading…
Add table
Reference in a new issue