From 41039483d30f6e706e0a7c3d224488db8f248466 Mon Sep 17 00:00:00 2001 From: Marco van Dijk Date: Mon, 19 Dec 2022 11:58:43 +0100 Subject: [PATCH] (Hopefully) fix output segfaults on full shared memory page --- src/output/output.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/output/output.cpp b/src/output/output.cpp index 8d64076d..fb260a24 100644 --- a/src/output/output.cpp +++ b/src/output/output.cpp @@ -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(); }