(Hopefully) fix output segfaults on full shared memory page

This commit is contained in:
Marco van Dijk 2022-12-19 11:58:43 +01:00 committed by Thulinma
parent 20812842b9
commit 41039483d3

View file

@ -359,9 +359,9 @@ namespace Mist{
if (isPushing()){return;}
//live streams that are no push outputs (recordings), wait for stream to be ready
if (!isRecording() && M.getLive() && !isReadyForPlay()){
if (!isRecording() && M && M.getLive() && !isReadyForPlay()){
uint64_t waitUntil = Util::bootSecs() + 45;
while (M.getLive() && !isReadyForPlay()){
while (M && M.getLive() && !isReadyForPlay()){
if (Util::bootSecs() > waitUntil || (!userSelect.size() && Util::bootSecs() > waitUntil)){
INFO_MSG("Giving up waiting for playable tracks. IP: %s", getConnectedHost().c_str());
break;
@ -371,6 +371,7 @@ namespace Mist{
stats();
}
}
if (!M){return;}
//Finally, select the default tracks
selectDefaultTracks();
}