summaryrefslogtreecommitdiff
path: root/tsworker.c
diff options
context:
space:
mode:
Diffstat (limited to 'tsworker.c')
-rw-r--r--tsworker.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/tsworker.c b/tsworker.c
index 5440087..30b1701 100644
--- a/tsworker.c
+++ b/tsworker.c
@@ -172,18 +172,30 @@ void cTSWorker::ActionTCP(void) {
m_StreamClient->RemoteIp().c_str(), m_StreamClient->RemotePort());
}
else
- {
+ {
#ifdef DEBUG
fprintf(stderr, "[ffnetdev] Streamer: Error closing client socket.\n");
#endif
esyslog("[ffnetdev] Streamer: Error closing connection.");
m_Active=false;
continue;
- }
-
+ }
}
if ( select.CanWrite(*m_StreamClient) ) {
+
+ if (m_StreamDevice->GetPlayState() == psBufferReset)
+ {
+ cCondWait::SleepMs(10);
+ m_StreamDevice->SetPlayState(psBufferReseted);
+ }
+
+ if (m_StreamDevice->GetPlayState() == psBufferReseted)
+ {
+ cCondWait::SleepMs(10);
+ continue;
+ }
+
int count=0;
m_StreamDevice->LockOutput();
@@ -329,6 +341,7 @@ void cTSWorker::ActionUDP(void)
}
+
int count=0;
m_StreamDevice->LockOutput();