httplive: Adjust conditions for playlist reloading

Commit 7655d6c889 changes HLS http
playlist reloading policy. But leaving only one fragment in buffer is
not enough. This patch ensures that less than three fragments in buffer
leads to playlist reloading. The overal result is more reliable http
streams.

Signed-off-by: Ilkka Ollakka <ileoo@videolan.org>
This commit is contained in:
Heorhi Valakhanovich 2013-12-16 01:28:34 +03:00 committed by Ilkka Ollakka
parent 9f0a91cb7e
commit 9cc6af3855

View File

@ -1718,8 +1718,8 @@ static void* hls_Reload(void *p_this)
mtime_t now = mdate();
if (now >= p_sys->playlist.wakeup)
{
/* reload the m3u8 if there are less than 2 segments what aren't downloaded */
if ( ( p_sys->download.segment - p_sys->playback.segment < 2 ) &&
/* reload the m3u8 if there are less than 3 segments what aren't downloaded */
if ( ( p_sys->download.segment - p_sys->playback.segment < 3 ) &&
( hls_ReloadPlaylist(s) != VLC_SUCCESS) )
{
/* No change in playlist, then backoff */