From 6811b5418628172e85d91e0cc366c76ae9c6c87c Mon Sep 17 00:00:00 2001 From: Balder Date: Thu, 11 May 2017 16:34:30 +0200 Subject: [PATCH] le fixes by me, all me none of it was Erik --- src/input/input_hls.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/input/input_hls.cpp b/src/input/input_hls.cpp index c50aa8de..c37cb54c 100644 --- a/src/input/input_hls.cpp +++ b/src/input/input_hls.cpp @@ -41,6 +41,7 @@ namespace Mist { initDone = false; lastTimestamp = 0; uri = uriSrc; + startTime = Util::bootSecs(); if (uri.size()){ std::string line; @@ -628,7 +629,7 @@ namespace Mist { thisPacket.null(); - while (!hasPacket && config->is_active) { + while (!hasPacket && config->is_active && nProxy.userClient.isAlive()) { if (playlists[currentPlaylist].isUrl()) { endOfFile = playlists[currentPlaylist].atEnd(); @@ -675,7 +676,7 @@ namespace Mist { int playlistTime = reloadNext.at(currentPlaylist) - Util::bootSecs() - 1; if (playlistTime < segmentTime) { - while (playlistTime > 0) { + while (playlistTime > 0 && nProxy.userClient.isAlive()) { Util::wait(900); nProxy.userClient.keepAlive(); playlistTime--; @@ -1004,7 +1005,7 @@ namespace Mist { int segmentTime = playlists[pListId].entries.front().timestamp - Util::bootSecs(); if (segmentTime){ --segmentTime; - while (segmentTime > 1) { + while (segmentTime > 1 && nProxy.userClient.isAlive()) { Util::wait(1000); --segmentTime; continueNegotiate();