From 3e6b7fc9e8710e1860f4dfb419c9e3968aeb193c Mon Sep 17 00:00:00 2001 From: Thulinma Date: Thu, 8 Feb 2018 13:08:54 +0100 Subject: [PATCH] Fixed TS input not shutting down correctly, fixed issue when track is not properly filled --- src/input/input_ts.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/input/input_ts.cpp b/src/input/input_ts.cpp index 768d360a..4d854f10 100755 --- a/src/input/input_ts.cpp +++ b/src/input/input_ts.cpp @@ -71,7 +71,7 @@ void parseThread(void * ignored) { Util::sleep(100); continue; } - while (liveStream.hasPacket(tid)){ + while (liveStream.hasPacket(tid) && (Util::bootSecs() - threadTimer[tid] < THREAD_TIMEOUT && cfgPointer->is_active && (!liveStream.isDataTrack(tid) || myProxy.userClient.isAlive()))){ liveStream.initializeMetadata(myMeta, tid); DTSC::Packet pack; liveStream.getPacket(tid, pack); @@ -79,6 +79,9 @@ void parseThread(void * ignored) { myProxy.continueNegotiate(tid, myMeta, true); myProxy.bufferLivePacket(pack, myMeta); } + if (!pack){ + Util::sleep(500); + } } { tthread::lock_guard guard(threadClaimMutex);