Skip to content

Commit

Permalink
Do not empty IPTVHLS buffer if there's no listener.
Browse files Browse the repository at this point in the history
This prevents the HLS buffer to be quickly exhausted during transition.
  • Loading branch information
jyavenard committed Aug 10, 2012
1 parent b466a1f commit 3234a34
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mythtv/libs/libmythtv/iptv/iptvfeederhls.cpp
Expand Up @@ -83,6 +83,12 @@ void IPTVFeederHLS::Run(void)
{
if (m_hls == NULL)
break;
if (_listeners.empty())
{
// No-one is listening, no point emptying the HLS buffer
usleep(50000);
continue;
}
m_lock.lock();
uint size = m_hls->Read((void *)m_buffer, BUFFER_SIZE);
if (size < 0)
Expand Down

0 comments on commit 3234a34

Please sign in to comment.