Commit 9cc6af38 authored by Heorhi Valakhanovich's avatar Heorhi Valakhanovich Committed by Ilkka Ollakka

httplive: Adjust conditions for playlist reloading

Commit 7655d6c8 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: default avatarIlkka Ollakka <ileoo@videolan.org>
parent 9f0a91cb
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment